Who is this exercice for?
- Elementary school (from 1st grade to 5th grade)
- beginning of junior High school (6th grade)
What will the pupils discover?
- Calculate with integers
- Progressivity marks
- Recognize and use some geometric models
- Move an locate an object in 2D space
Goal of the exercice
The pupils, in pairs, will use a Thymio robot to draw a picture. The tracing of each line must be programmed by the pupils using the Timer function of the Aseba VPL software.
Timer/Timer elapsed functions
This event occurs when the timer times out.
This action starts a timer with a timeout in the range of 0 to 4 seconds, defined by the user by clicking somewhere in the clock face. When the timer has elapsed, a timer event is generated.
With Timer and Timer elapsed, it is possible to calculate a distance from the Time variable to make Thymio move to the different waypoints, so that the drawing is completed.
The conversions table below will help you do your math!
For this exercice, we have chosen to draw a castle, but it is up to you to decide which picture you will draw! One restriction though: it is preferable to have a design that can be drawn without raising the pen from the paper.
Instructions for this exercice with Thymio
- Choose a simple shape to draw..
- Then, measure the sides of your drawing. You can approximately determine the speeds and times for each line thanks to the table of conversion.
- Create your blocs using the Timer function for the Time variable and the State function to count the steps. Be careful, only 16 steps are possible using graphical programming (VPL). To draw the castle, with used the Aseba Studio interface (not the Visual Programming Language).
This action sets the internal 4-bit state of the robot. Grey means keeping the current value, white means set it to 0, yellow means set it to 1.
Castle drawing code (solution)
If you don’t own a Thymio robot (yet)..
You can buy the Thymio robot (both standard and wireless versions) on our webstore: