Meet Alvik — Your First Robot Drive
Unbox the Arduino® Alvik robot, connect it over USB-C, and write your first MicroPython program to light its LEDs and drive it in a square.
What students learn
Students learn how a real robot is organised: a Nano ESP32 brain that runs their MicroPython code, an STM32 co-processor that drives the motors in real time, and a battery that powers both. They write, upload and run their first robot program.
The science behind this experiment
- Alvik has two processors: an Arduino Nano ESP32 (ESP32-S3) that runs your MicroPython code, and an STM32 Arm Cortex-M4 on the carrier board that handles motors, encoders and sensors in real time.
- Splitting a robot into a high-level brain and a real-time controller is standard practice — it keeps motor timing precise even when the main program is busy.
- set_color(r, g, b) takes three values of 0 or 1, so the two RGB LEDs can show eight distinct colours.
- move(cm) and rotate(deg) are closed-loop commands: the STM32 counts encoder pulses and stops the wheels when the requested distance or angle is reached.
- A program that ends without alvik.stop() can leave the motors energised, draining the battery.
Key relation: Total path of a square = 4 × side length. For side = 20 cm, total distance = 80 cm and total turning = 4 × 90° = 360°.
Equipment used
- Arduino® Alvik robot (AKX00066)
- 18650 Li-Ion battery (fitted)
- USB-C to USB-C cable
- Computer with Arduino Lab for MicroPython
- Tape measure or metre rule
- Masking tape to mark the start position
Questions for students
- Alvik has no way of knowing where it actually is — only how far its wheels have turned. What kinds of mistakes does that cause, and what extra sensor would fix them?
- If you wanted Alvik to drive a triangle instead of a square, what would you change in the code, and what angle would each turn need to be?
What to expect
Both LEDs turn blue, then Alvik drives four straight legs of about 20 cm separated by four 90° turns, ending close to — but usually not exactly on — its starting point. A mobile robot follows commands, not intentions. Alvik converts move() and rotate() into encoder counts, so it drives a good square but never a perfect one — small errors on every leg accumulate, which is why real robots add sensors that correct against the outside world.
Run this experiment in your classroom
This experiment is part of ATP Volta — a self-contained mobile science lab that turns an ordinary classroom into a working STEM laboratory, with over 200 experiments in physics, chemistry, biology, robotics and engineering. Gali, the AI tutor built into ATP Connect, guides students through each step and answers their questions at the bench.
See the ATP Volta mobile science labTalk to our team