Live coding a Nerves robot with Livebook
summary
Wobbles is a self‑balancing two‑wheel robot built on a Raspberry Pi running Elixir and Nerves and 3D‑printed with OpenSCAD. Livebook runs on‑device to read an MPU accelerometer/gyro over I2C and parse 14 bytes into signed integers using binary pattern matching in a GenServer. Motor control uses NEMA 17 steppers through a stepper driver and pigpio PWM, realtime angle plots use Kino, and hands‑on PID tuning gets the robot nearly balanced though not fully stable.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 3:43BEAM robotics experiments
- 13:183D printing with OpenSCAD
- 14:00I²C sensors and binary matching
- 19:21Motor control challenges
- 26:55Livebook demo on robot
- 31:55Sensor data with Kino
- 33:01PID controllers explained
- 38:00Tuning PID in real time
- 40:29Final adjustments







