raspbot¶
Clean Python library for controlling the Yahboom Raspbot V2 robot car on Raspberry Pi.
raspbot replaces two unmaintained legacy libraries (Raspbot_Lib and yahboom_oled) with a
modern, modular, fully-typed package that is installable from PyPI.
Features¶
| Subsystem | Class | Notes |
|---|---|---|
| Motors | Motors |
Four-wheel drive, signed or directional speed |
| Servos | Servo, ServoPair |
Pan/tilt with angle clamping |
| Buzzer | Buzzer |
Beep patterns |
| LEDs | LedBar |
14 WS2812 NeoPixels, indexed colour + direct RGB |
| LED effects | LightEffects |
River, breathing, random, starlight, gradient |
| Ultrasonic | UltrasonicSensor |
Distance in mm / cm, context manager |
| Line tracker | LineTracker |
4-channel IR array, frozen LineState dataclass |
| IR remote | IRReceiver |
Key-code polling, context manager |
| Button | Button |
KEY1 tactile button, polled |
| OLED display | OLEDDisplay |
128x32 SSD1306 via luma.oled (optional extra) |
| Camera | Camera |
OpenCV VideoCapture wrapper (optional extra) |
| Cooperative tasks | Task |
Non-blocking rate-gate, decorator factory |
Quick install¶
Quickstart¶
Non-blocking loop with cooperative tasks:
Requirements¶
- Raspberry Pi running Raspberry Pi OS (32-bit or 64-bit)
- Python 3.10 or later
- I2C enabled (
sudo raspi-config> Interface Options > I2C) - User in the
i2cgroup:sudo usermod -aG i2c $USER - Yahboom Raspbot V2 powered on and connected via I2C bus 1
Next steps¶
- Getting Started -- prerequisites, wiring, first program
- API Reference -- full class and method documentation
- Guides -- in-depth usage patterns