![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
nRF51822 serves as the bridge between BLE central and MCU, which makes cental able to fetch photos from serial camera.
Dependencies: BLE_API mbed nRF51822
Fork of nRF51822_blinky by
Diff: src/main.cpp
- Revision:
- 17:0c7951915608
- Parent:
- 16:5552833a3401
- Child:
- 18:d146cee0a80e
--- a/src/main.cpp Sat Apr 09 05:12:00 2016 +0000 +++ b/src/main.cpp Sun Apr 17 11:02:38 2016 +0000 @@ -11,8 +11,8 @@ #include "ringBuffer.h" #include "application.h" -#define DEVICE_NAME "ket_041" -#define CODE_VERSION 3 +#define DEVICE_NAME "ket_042" +#define CODE_VERSION 4 #define SDA_PIN P0_8 #define SCL_PIN P0_9 @@ -743,9 +743,6 @@ #ifdef APPLICATION_TIMEOUT disConnIdleCnt = 0; #endif - #ifdef LOW_POWER_CONSTRAINT - lowPowerCounter = 0; - #endif ticker.attach_us(timerPeriodicalCB, MINIMUM_TICKER_PERIOD); ledPower = 0; uartEnable = 1; @@ -781,6 +778,9 @@ ble.gap().stopAdvertising(); ledPower = 1; uartEnable = 0; + #ifdef LOW_POWER_CONSTRAINT + lowPowerCounter = 0; + #endif deepsleep(); }