Mini Project 3

Jimmy Mozart, a musical robot

Jim:

Our team mananged to help give Jim the mechanisms to play his first song all by himself.

Jim's freestyle:

Sometimes Jim likes to freestyle with his beats.

As you can see, Jim plays tones based on the distance his distance sensor reads. He rolls along at a constant pace, and so you can set up objects in patterns to play different songs.

Description:

Jimmy Mozart, a musical robot we created for mini-project 3. We plugged in the distance sensor so that Jim could play different notes based on different distance. So how could we change the distance so that Jimmy could play a song? Our group decided to let Jimmy move on the ground and we put some cardboard before the distance sensor so that it could play variable notes. We add four wheels in the front and another four in the back to make Jimmy have a stable structure. As the most creative and interactive musical robot, Jimmy can play music alone and also can be played as a instrument by genius composers.

Difficulties and Process:

The difficulties that we have met is the distance sensor did not work very efficient. In another word, it is a little bit difficult to make the robot play the note that we want. The sensor sometimes need time to detect the correct distance and if we make the length of the cardboard very short, the sensor may not detect the short one and thus, the note will not be played. Thus, in order to let Jimmy play the notes we want, we put some tape on the ground so that we could know the exact place where we should locate our cardboard. In addition, another difficulty we faced was how to make Jimmy play the same note with time interval. Firstly, we tried to adjust the speed of Jimmy but it didn't work. Thus, we decided to control the time of each tone playing by setting specific time period for each note, and then we made several longer cardboard in order to make Jimmy play the same tone twice.

Code

Big nested loop is for playing different tones at different distances, and the part at the bottom makes Jim go forward. There are eight notes in total to make sure Jim can play any complete songs and compose new songs by itself.

Credit:

We give credits to the support that professor Eguchi provides to us. She give us many suggestions on how to let the distance sensor detech the cardboard accurate.