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
Revision 11:0e738f47ecd2, committed 2014-10-01
- Comitter:
- Bobty
- Date:
- Wed Oct 01 17:53:48 2014 +0000
- Parent:
- 10:c9a78ca03515
- Child:
- 12:150a6480a157
- Commit message:
- Back to 2ms fails after some longish time
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Oct 01 07:42:28 2014 +0000 +++ b/main.cpp Wed Oct 01 17:53:48 2014 +0000 @@ -35,7 +35,7 @@ #endif /* #if NEED_CONSOLE_OUTPUT */ // Sample interval (uS) -volatile uint32_t sampleIntervalUs = 1000; +volatile uint32_t sampleIntervalUs = 2000; // Timer to do the sampling etc Timer intervalTimer; @@ -58,7 +58,7 @@ void periodicCallback(void) { callbackCount++; - if (callbackCount == 1000) + if (callbackCount == 500) { callbackCount = 0; indicatorLed1 = !indicatorLed1; @@ -109,7 +109,7 @@ { triggerSensorPolling = false; bleUpdateCount++; - if (bleUpdateCount >= 1000) + if (bleUpdateCount >= 500) { bleUpdateCount = 0; indicatorLed2 = !indicatorLed2;