Get Help
Moving the Robot (miniBloq)
Introduction
Moving your Sparki is easy. Sparki is a differential drive (or differential wheeled) mobile robot. This means that the robot movements are driven by the difference in speed between the left and the right wheel. For example, if the right wheel is rotating faster than the left one, the robot will turn left:
On the other hand, if the wheels move in opposite directions at the same speed, the robot will rotate around its center (which is also the exact place where it can hold a marker to draw):
The following images demonstrates the main movements that we can program for Sparki, playing with different speeds on its left and right wheels::
Now let’s move it!
Having learned this, we are now going to see how to program the robot in order to move it.
2. To rotate Sparki around its own center:
The following example shows how to use these blocks to make Sparki move forward for 5 cm, move backward (again for 5 cm), then rotate 90 degrees to the right, and finally rotate 90 degrees to the left:
See how easy is to move Sparki using miniBloq? Just with these four blocks, we can tell the Sparki to accurately rotate, advance, and go backward. In future lessons we will be making use of these blocks to achieve more complex behaviors with Sparki.
Questions
- Why do you think that moving the wheels at different speeds and with opposite directions does not make sense?
- What other vehicles in real life use this system (differential drive) to move?
SparkiDuino Programming Environment
This lesson is also available for the SparkiDuino Programming Environment. SparkiDuino will allow you to program your Sparki using standard Arduino syntax.