Discover our
resources

The robot: Introduction

Introduction

Thymio is an educational robot designed by researchers at EPFL, in collaboration with ECAL, and is very popular in colleges for teaching programming with Scratch.

Thanks to our AlphAI software, teachers can now help their students discover and understand AI.

In our activities, you will have the opportunity to train AI models in supervised or reinforcement learning, in order to carry out more complex tasks with the Thymio robot.

Composition

Sensors

The sensors you can use on the software are :

IR proximity‍

Allows use of the robot's 5 front and 2 rear infrared sensors.some text

  • The first button lets you select which sensors you wish to activate: all, none, front sensors, rear sensors, central sensor, side sensors.
  • The binary mode option allows you to obtain integer values 0 or 1 instead of decimal values between 0 and 1.
  • When binary mode is active, the IR threshold parameter is used to set the switching threshold between binary values 0 and 1. For example, when the threshold is set to 0.5 (default value), all values between 0.5 and 1 are rounded to 1, and all values between 0 and 0.5 are rounded to 0.


Line tracking IR‍

  • allows you to use the 2 infrared line-following sensors located under the robot. They communicate a value between 0 and 1 depending on the brightness of the surface. There are two main modes:some text
    • Black detection: value 0 corresponds to white and value 1 corresponds to black. Recommended for tracking a black line on a white background.
    • Reflection detection: value 0 corresponds to black and value 1 corresponds to white

         The binary mode option allows you to obtain only integer values 0 and 1 instead of decimal values between 0 and 1.

  • When binary mode is active, the IR threshold parameter is used to set the switching threshold between binary values 0 and 1. For example, when the threshold is set to 0.5 (default value), all values between 0.5 and 1 are rounded to 1, and all values between 0 and 0.5 are rounded to 0.



Accelerometer‍

  • Allows you to use the robot's gyroscope. It communicates a value for each axis: x (behind - in front), y (left - right) and z (down - up). You can select a single axis, or a combination of them.



computer camera‍

  • allows you to use your computer's webcam as a sensor. Several options are available, determining camera resolution and whether or not to use zoom.

The camera image pre-calculation button is used to modify the processed values:

  • when pre-calculation is deactivated, the image defaults to color (RGB system).
  • grayscale mode captures the brightness of each pixel.
  • the color mode in the image detects colors. All white/gray/black pixels will obtain the value 0 and colored pixels the value 1.
  • green channel mode detects only the presence of green (values close to 1) or its absence (values close to 0).
  • red vs. green mode returns a value between -1 and 1 for each pixel, corresponding to the amount of red minus the amount of green.

  • The take photo button lets you take a photo with the webcam and save it on your computer.
  • The mirror effect option reverses or not the image (left-right axial symmetry).
  • The camera index option lets you select which webcam to use when your device has more than one.

The actions

The actions you can use on the software are :

  • Movement:


  • Pivoting :
  • Lighting :

You can also create a custom action by clicking on the button: 

The following window will then appear: 

Name your action and check "robot action" to modify the parameters: the new action is now available.

To save it for future use, click on File > Save > Save configuration.

Operating environment

We recommend that you use Thymio in an AlphAI arena.

MOBSYA also offers robotic tracks for Thymio to move around. However, the absence of walls limits the activities you can carry out.
You can also simply move Thymio on a flat surface.



To carry out all the activities on the software, Thymio will need:

  • A very flat surface, ideally covered with a tarpaulin
  • Walls higher than the robot
  • One or more lines on the ground in a color that contrasts sharply with the tarpaulin (you can use black tape).

 

All activities can be carried out with the simulated robot in Thymio Suite.

Download
Related courses