Thymio the race car

Thymio the race car

racingcar.jpg

You need (exactly) two wireless Thymios.

Here's how :

  • Starts both Thymios.
  • Check that the wireless dongle is connected to the computer.
  • Open the program Aseba-Studio
  • Open the file racingcar.aesl.
  • Load and execute software on both Thymios.

The red Thymio is the race car, the other is the controller. Take the controller in your hand and guide your race car on the track.

The software

Both Thymios communicate over the wireless network using global event named control:

  • The controller sends 16 times per second the global event control to the race car. This event contains the position of the controller.

* The race car calculates with the received event control the the speed of the wheels.

The code on the controller:

onevent acc
   emit control acc

The code on the race car:

onevent control
   motor.left.target=30*(-2*event.args[1]-event.args[0])
   motor.right.target=30*(-2*event.args[1]+event.args[0])

Have fun …

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