Music From Track
tracks.jpg

A nice game to play with Thymio is to draw a track for it to follow, and make it play sounds whenever it sees colours on the side of the track.

This game was introduced to children on the JOM ("Journée Osez tous les Métiers") at EPFL.

Thymio can be programmed in two different ways: with the VPL and by direct coding with Aseba Studio.
The tracks can easily be drawn with coloured felt-tip pens or with paint (be careful that it is dry!)

VPL programming

VPL%20simple%20code.JPG

This simple code makes Thymio follow the black track with one ground proximity sensor, the left one (prox.ground.delta[0]), and play music whenever it detects a coloured patch beneath its ground sensor on the right (prox.ground.delta[1]).

Not working?

If Thymio keeps playing sounds whatever is drawn underneath its sensor, or on the contrary doesn't play sounds at all, you can change the sensitivity of the sensors in your program. For this, you need to open it in Aseba Studio.

Localise a portion of code that looks like this one, and try modifying the value "150".

If your robot keeps playing sounds try a smaller number, and if it doesn't play anything try putting a higher value (a white sheet should be detected around a value of 900).

You can also monitor the sensor's values in Aseba Studio, on the left of the program the "Variable" box enables you to see real time values of your robot's sensors.

monitor.JPG
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License