Funky mode

In this mode, the Timmyton will play a simple dance tune while moving back and forth and flashing the brick LED in a multicolor pattern. Navigate to the switch tab with the bottom brick button highlighted. Then, set up this mode with the usual two display blocks, plus a wait with the duration set to 1 second, a medium motor block (port A, On, 100 percent power), and Mode Loop:

The programming for the dancing, music, and lights goes inside of Mode Loop. Fairly straightforward, right? Here is the program that gets the Timmyton to play and dance along to a simple waltz tune:

Yikes! The program itself is not too difficult, but because ...

Get Building Smart LEGO MINDSTORMS EV3 Robots now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.