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
Diff: main.cpp
- Revision:
- 9:0ed64b14d46b
- Parent:
- 6:1d7e5fcc8d00
- Child:
- 10:2c5c202c69a5
--- a/main.cpp Tue Feb 24 15:38:16 2015 +0000
+++ b/main.cpp Thu Mar 12 12:52:26 2015 +0000
@@ -40,11 +40,12 @@
int main(void)
{
//TODO: I want to be able to send something like:
- uint8_t command[8] = { 0x4d,0x32,0x81,0xc0,0x4d,0x32,0x81,0xc0 };
+ uint8_t cmdOn[8] = { 0x4d,0x32,0x81,0xc0,0x01,0x01,0x01,0x01 };
+ uint8_t cmdOff[8] = { 0x4d,0x32,0x81,0xc0,0x00,0x00,0x00,0x00 };
//with first 4 bits being type code, and last 4 being command, or something
- uint8_t cmdOn = 0x01;
- uint8_t cmdOff = 0x02;
+ //uint8_t cmdOn = 0x01;
+ //uint8_t cmdOff = 0x02;
//blinky
led1 = 1;
@@ -57,7 +58,7 @@
ble.onConnection(connectionCallback);
//CarCommsService commsService(ble, cmd);
- BroadcasterService broadcasterService(ble, cmdOff);
+ BroadcasterService broadcasterService(ble);
/*
**BREDR_NOT_SUPPORTED = BLE only