Playing a song

02 Feb 2025 - 01:49 | Version 1 |

Objectives

  1. Reinforce repetition
  2. Reinforce selection
  3. Be creative and have fun

Assignment

  1. Create a clean program that will play a song based upon the colors read
    1. each color represents a different note
    2. the program should stop when the touch sensor is activated
  2. Additional requirements
    1. the color sensor should be pointed down and connected to port 3
    2. the touch sensor should be in the front of the robot and connected to port 4
    3. each color (in increasing order) should represent a different note in increasing order

Submission instructions

  1. Due date is found on Canvas
  2. Each person should create a pdf document that contains the following information
    1. Your name
    2. A brief description of what you did
    3. How you improved over any mistakes made last time
    4. Indicate which hints (if any) you used
    5. How well you achieve each objective
  3. Submission:
    1. submit the team's code pdf document in one zip folder.

Hints

  1. What to do with the motors

Challenges

  1. Create a pattern that is an actual song.
  2. Find a way to have more than 7 (or 8) different notes but still allow for the base eight notes
  3. Adjust so that the width indicates the length each note should play. Also allow for white space to indicate a rest.
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine