From c40aa38862d3805aff6a84692dbbd9919bcedd62 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Sun, 11 Dec 2022 10:42:35 +0000 Subject: [PATCH] improve instructions --- README.md | 17 +++++++++++++++++ csc.py | 4 +--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 064612b..8a5b479 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,20 @@ Perhaps useful if you have a stationary bike of some kind and want to put the vital statistics on a big screen instead of on your handlebar. ![screenshot](20221209_22h46m07s_grim.png) + +## How to use + +First you need to identify bluetooth address of your bike sensor(s). +Spin the wheel to wake it up, then run + +```sh +$ bluetoothctl scan on +Discovery started +[CHG] Controller 24:FD:52:00:ED:F1 Discovering: yes +[NEW] Device C2:35:5D:F2:F4:0F Giant Combo +[CHG] Device 98:06:3A:15:B7:BA RSSI: -82 +^C +$ bluetoothctl connect C2:35:5D:F2:F4:0F +``` + +Now \ No newline at end of file diff --git a/csc.py b/csc.py index d9b7e7b..50eb082 100644 --- a/csc.py +++ b/csc.py @@ -111,9 +111,7 @@ class Biscuit: pygame.display.flip() - -bike_address = 'C2:35:5D:F2:F4:0F' -bike = BLE_GATT.Central(bike_address) +bike = BLE_GATT.Central(sys.argv[1]) bike.connect() app = Biscuit()