Fearful behaviour (Red)
Thymio fearful
Tapping the Thymio causes it to chirp. If an object is detected by any of its horizontal sensors, Thymio turns to avoid it and chirps. It will also stop if it faces the border of a table. If you let Thymio fall, it squeaks (be sure to catch it!!). If you turn the Thymio on its side and rotate it, the yellow led closest to the ground will be lit, thus showing the direction of gravity.
This Aseba .aesl file contains the source code implementing this behaviour.