cycle speed and cadence service
Dependencies: BLE_API mbed nRF51822
Fork of Bluetooth_Heart_Rate_Monitor_dummy by
Diff: main.cpp
- Revision:
- 67:688f92dc0f49
- Parent:
- 65:7f84fa8c59ac
- Child:
- 69:2018e8c1d998
--- a/main.cpp Fri May 08 06:40:28 2015 +0000 +++ b/main.cpp Fri May 08 09:46:46 2015 +0000 @@ -24,7 +24,7 @@ * particularly for applications where the central may want a fast connection * interval.*/ #define UPDATE_PARAMS_FOR_LONGER_CONNECTION_INTERVAL 0 -#define TICK_TIME 1.0/1024 +#define TICK_TIME 1.0/1024.0 #define DEBOUNCE_TIME 100 BLEDevice ble; @@ -65,6 +65,7 @@ wheelCounter++; wheelEvent=counter; led1= !led1; + updateWheel=true; } } @@ -74,6 +75,7 @@ crankCounter++; crankEvent=counter; led1= !led1; + updateCrank=true; } } @@ -82,7 +84,7 @@ { led1 = 1; Ticker ticker; - ticker.attach(periodicCallback, TICK_TIME); // blink LED every second + ticker.attach(periodicCallback, TICK_TIME); wheelDebounce.start(); crankDebounce.start();