All projectsSoftware / 05 of 06

Lean With It

An iPhone app that records motorcycle lean angle from a handlebar mount.

Category
Software
Updated
2026-09-28
Status
Sensor feasibility testing
Built with
Swift, SwiftUI, Core Motion, Core Location
The Lean With It ride screen on an iPhone: a large lean angle readout, a horizontal lean gauge, speed and peak lean, and a Calibrate & Start Ride button.
Ride screen before a ride starts, from August.

Lean With It records the phone’s motion sensors at 50 Hz and GPS once a second while I ride, with the screen locked. It shows a live lean gauge, and after the ride a history with peaks, speed and a replay of the route colored by lean.

The hard part is knowing what zero is. The phone sits on a Quad Lock mount at whatever angle it ended up, and the bike leans on its side stand when parked. The app estimates a riding zero from stretches of straight riding, using GPS to find them, and corrects for the side stand automatically. On two recent rides the live estimate landed within about 1° of a full-ride recalculation.

So far that’s five recorded road rides, each with a written analysis. It’s for my own phone for now.

Next project, 06mox