Random walk accompanied by two kinds of musical sounds

Ole Caprani, University of Aarhus, Department of Computer Science,

This is a small car. The car can make musical sounds through a speaker connected to output port B of LEGO MindStorms RCX. The speaker is built into the rubber tyre on top of the car. The car has two motors connected to port A and C. Touch sensors connected to the three input ports of the RCX can be activated when the car bumps into obstacles.

By means of the two motors the car can be programmed e.g. to do random walk, and when it bumps into obstacles it can turn away or back off.

The car has been used for a prototyper experiment with different ways of making sounds while the car moves. Two RCX control programs have been designed and implemented: Bug.c and SuperMario.c. They both make the car do a random walk with obstacle avoidance. The two programs differ in the way they use the speaker. One program, Bug.c, accompanies the random walk by sounds closely following the moves of the car. When the car bumps into an obstacle the turn or back off is accompanied by sounds very different from the randomly chosen notes played during the random walk. This behaviour can be observed on BugVideo1 and BugVideo2

In the other program, SuperMario.c, a melodic sound accompanied the random walk. When obstacles are encountered the melody is interrupted and the program makes one of the avoid sounds. When the avoid behaviour has moved the car away from the obstacle, the melody is continued from where is was interrupted. This behaviour can be observed on SuperMarioVideo1 and SuperMarioVideo2

The two programs have been written in C and cross-compiled to the Hitachi H8/3292 processor on board the RCX. The compiled programs are represented as S-records. The source text and S-records for the two programs are: SmallCarBug.c, SmallCarBug.srec, SuperMario.c, SuperMario.srec, and SuperMario.h.

The car, the speaker and the programs were made by Jens Jakobsen, Jakob Fredslund, Jørgen Møller Ilsø, Rasmus B. Lunding and Ole Caprani.

Last update: 9-03-01