Skip to content
Janclab Matija Janc · Platform & AI engineer
ongoing

RC Car

Drive a physical RC car from your phone, with a motion lease on the Arduino that brakes the car when the control link goes quiet.

Live, in your browser — not a screenshot.

2018 → 2026 · 106 commits
3 tiers: RN app → TS bridge → Arduino
400 ms motion lease → brake to stop
whole stack drivable with no hardware

Problem

A phone, bridge and Arduino control a real moving car over lossy home Wi-Fi. The defining safety question is what happens when the car stops hearing from the operator mid-drive. “Keep going” is not acceptable.

What I built

A React Native app sends drive state through a typed Node.js WebSocket-to-serial bridge to Arduino firmware controlling steering, throttle and safety sensors. A built-in simulator runs the complete stack without hardware, and the app has been carried from React Native 0.54 to 0.86.

The hard part

Button press/release events are unsafe: lose the release packet and the car never stops. Keep-alives are also unsafe because they can keep stale throttle alive.

The app instead streams absolute drive state every 150 ms. Firmware grants non-neutral motion a 400 ms lease; only fresh operator state renews it. Silence from a dead app, bridge or Wi-Fi link therefore means stop. When the lease expires, firmware actively brakes until wheel pulses show standstill, avoiding both freewheeling and reverse thrust from braking too long. The safety invariant lives on the car, where upstream packet loss cannot bypass it.

Results

The full stack drives a real car or the simulator. Losing the control link while moving now brakes the car to a stop. It is the portfolio's longest-running project: 106 commits across 2018–2026.