# TeleBike

Phone-on-handlebars motorcycle sim controller. See [CLAUDE.md](CLAUDE.md) for the design and
[PROTOCOL.md](PROTOCOL.md) for the packet format.

## Quick start

### PC (once)
1. Install ViGEmBus (done on the dev PC).
2. `pip install -r pc/requirements.txt`

### PC (every session)
```powershell
.\pc\run.ps1
```
Leave it running. It creates the virtual controller and prints live axis values.

### Phone
1. Build and install: `cd android; .\gradlew.bat installDebug` (phone on USB with debugging on).
2. Plug the phone into the PC over USB and enable **USB tethering**
   (Settings > Connections > Mobile Hotspot and Tethering). Wi-Fi on the same LAN also works.
3. Open TeleBike, tap **Find PC**, then **Start**.
4. Stand the pivot pole upright with the handlebars square and tap **Re-center**.

### Tuning
Edit `pc/config.json` (no rebuild needed): per-axis range in degrees, deadzone, curve,
inversion, controller target, smoothing, and `yaw_into_steer` to blend handlebar turn into
the lean axis.

### Testing without the phone
```powershell
python pc/test_sender.py
```
