Test using the base BLE_HeartRate example to see the effect of increasing the "ticker" rate on stability (intending to do AnalogIn around 1ms rate)
Dependencies: BLE_API mbed nRF51822
Diff: main.cpp
- Revision:
- 4:da9077b096ec
- Parent:
- 3:0fc7c2d73a24
- Child:
- 5:6f5f1b37bd59
--- a/main.cpp Mon Sep 29 14:39:15 2014 +0000 +++ b/main.cpp Mon Sep 29 21:01:42 2014 +0000 @@ -35,7 +35,7 @@ #endif /* #if NEED_CONSOLE_OUTPUT */ // Sample interval (uS) -volatile uint32_t sampleIntervalUs = 2000; +volatile uint32_t sampleIntervalUs = 10000; // Timer to do the sampling etc Timer intervalTimer; @@ -58,7 +58,7 @@ void periodicCallback(void) { callbackCount++; - if (callbackCount == 1000) + if (callbackCount == 100) { callbackCount = 0; led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */