Odometry Pedometer using nRF51822 and ADXL345
Dependencies: ADXL345 BLE_API mbed nRF51822
Fork of BLE_CycleSpeedCadence by
Revision 47:430545f41113, committed 2014-09-30
- Comitter:
- rgrover1
- Date:
- Tue Sep 30 02:14:27 2014 +0000
- Parent:
- 46:ee7c55907f36
- Child:
- 48:8bca6365f8b0
- Commit message:
- updating the underlying libraries.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| nRF51822.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Sep 30 00:07:32 2014 +0000
+++ b/main.cpp Tue Sep 30 02:14:27 2014 +0000
@@ -21,6 +21,7 @@
#include "DeviceInformationService.h"
BLEDevice ble;
+DigitalOut led1(LED1);
const static char DEVICE_NAME[] = "Nordic_HRM";
static const uint16_t uuid16_list[] = {GattService::UUID_HEART_RATE_SERVICE,
@@ -35,6 +36,8 @@
void periodicCallback(void)
{
+ led1 = !led1; /* Do blinky on LED1 while we're waiting for BLE events */
+
/* Note that the periodicCallback() executes in interrupt context, so it is safer to do
* heavy-weight sensor polling from the main thread. */
triggerSensorPolling = true;
@@ -42,6 +45,7 @@
int main(void)
{
+ led1 = 1;
Ticker ticker;
ticker.attach(periodicCallback, 1);
--- a/nRF51822.lib Tue Sep 30 00:07:32 2014 +0000 +++ b/nRF51822.lib Tue Sep 30 02:14:27 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#e6cc149033a6 +http://mbed.org/teams/Nordic-Semiconductor/code/nRF51822/#936d81c963fe
