Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed nRF51822
Fork of BLE_notifications_with_orig_mbed by
Diff: main.cpp
- Revision:
- 14:700ba072d1a0
- Parent:
- 13:d4448d59ab69
- Child:
- 15:d117591084ff
--- a/main.cpp Wed Apr 19 01:22:46 2017 +0000
+++ b/main.cpp Wed Apr 19 01:47:36 2017 +0000
@@ -92,7 +92,11 @@
int main(void)
{
pc.printf("entering main!! \r\n");
- uint8_t counter = 0;
+ //uint8_t counter = 65; //'A'
+ uint8_t counter[16] = {65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65,
+ 65, 65, 65, 65, 65,
+ 0};
BLE &ble = BLE::Instance();
ble.init(bleInitComplete);
@@ -106,9 +110,13 @@
while (true) {
pc.printf("loop!\r\n");
if(isThereAConnection) {
- pc.printf("sending Notification: %d\r\n", counter);
+ //pc.printf("sending Notification: %d\r\n", counter);
+ pc.printf("sending Notification: %d\r\n", counter[0]);
buttonServicePtr->updateButtonState(counter);
- counter++;
+ //counter++;
+ for( int i = 0; i < 16; i++ ) {
+ counter[i] = counter[i]+1;
+ }
} else {
//
}
