BugBot¶
BugBot is a small robot for learning real robotics. It has a camera, a depth sensor, an inertial sensor and an optical-flow sensor, it moves in any direction on its mat, and you program it in Python. The same program runs on the real robot or in the simulator in your browser.
import bugbot; bugbot.go() # always the first line
led("green")
forward(60, distance=20) # drive 20 cm, then stop
turn(90) # quarter turn clockwise
print("wall in", distance(), "cm")
The robot's motion is deliberately imperfect. Four vibration motors slide it across the mat, and no two moves are quite the same. It goes where you tell it because its sensors keep correcting it, many times a second. Learning why that works, and how to make it work better, is the point.
-
Getting Started
Plug the robot in, press Connect, run your first program. Nothing to install.
-
Lessons
Student lessons with the simulator live in the page: press Run and the robot moves. Tasks checked as you go.
-
Simulator
A 3D BugBot on its mat, driven by your code, in the browser.
-
Hardware
The three boards, the schematics, the parts, and how it goes together.
-
Python Library
Control the robot from a laptop program through the USB dongle.
-
API Reference
Every function you can call, with units and what it does on the robot and in the sim.
What's in the robot¶
| Brain | ESP32-P4 with an ESP32-C6 for Wi-Fi (Vision board) |
| Camera | OV5647, 22-pin flex |
| Depth | VL53L5CX 8 x 8 time-of-flight grid |
| Motion sensing | PMW3360 optical flow and a BNO055 9-axis IMU (Odometry board) |
| Drive | four vibration motors on DRV8830 drivers (Motion board) |
| Extras | two servo outputs, one RGB LED |
| Power | 1S LiPo, USB-C charging |