Test code. Blinks by default at 2 seconds. Receives single characters from PC (sensor) and transmit to "nRF Connect" on droid. Droid can send ascii to Nano. When droid sends "A", blinking is twice per second. "B" returns to slow.
Dependencies: BLE_API mbed nRF51822
Fork of IofT_comm by
Diff: main.cpp
- Revision:
- 6:42bb0cde20f0
- Parent:
- 5:3384d9d80bf3
--- a/main.cpp Sun Jan 15 14:25:30 2017 +0000 +++ b/main.cpp Mon Jan 30 23:04:36 2017 +0000 @@ -159,7 +159,7 @@ ble.accumulateAdvertisingPayload(GapAdvertisingData::BREDR_NOT_SUPPORTED); ble.setAdvertisingType(GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED); ble.accumulateAdvertisingPayload(GapAdvertisingData::SHORTENED_LOCAL_NAME, - (const uint8_t *)"IoT_bluetooth", sizeof("IoT_bluetooth") - 1); + (const uint8_t *)"YSU_bluetooth", sizeof("YSU_bluetooth") - 1); ble.accumulateAdvertisingPayload(GapAdvertisingData::COMPLETE_LIST_128BIT_SERVICE_IDS, (const uint8_t *)uart_base_uuid_rev, sizeof(uart_base_uuid)); // 100ms; in multiples of 0.625ms.