This project contains two type of beacons: Eddystone and iBeacon.
Dependencies: microbit-iBeacon
Fork of BTW_ComboBeacon_Solution by
main.cpp
- Committer:
- krenbluetoothsig
- Date:
- 2018-08-02
- Revision:
- 21:8d35c362b325
- Parent:
- 19:8c3dd0a6a0a1
File content as of revision 21:8d35c362b325:
#include "MicroBit.h" /****************************************************** * Macros ******************************************************/ // TODO: add ADV on and off flag /****************************************************** * Constants ******************************************************/ // TODO: constants, used for iBeacon UUID(MSB first), Major, Minor and txpower setting /****************************************************** * Variables ******************************************************/ //microbit object MicroBit uBit; //Initial USB-to-Serial, baud rate is 9600-8-N-1 Serial pcCom(USBTX, USBRX); // TODO: global data and functions /****************************************************** * Functions ******************************************************/ // TODO: functions, startAdvertising and stopAdvertising // TODO: functions, used for ButtonA and ButtonB interrupt callbacks int main() { // Serial output after a reset pcCom.printf("mBit Beacon.\n\r"); // Initialize the micro:bit runtime. uBit.init(); // TODO: Register the interrupt and callback for ButtonA and ButtonB // TODO: First Advertisment, adv name only release_fiber(); }