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: microbit-iBeacon
Fork of BTW_ComboBeacon_Solution by
main.cpp
00001 #include "MicroBit.h" 00002 00003 /****************************************************** 00004 * Macros 00005 ******************************************************/ 00006 // TODO: add ADV on and off flag 00007 00008 00009 /****************************************************** 00010 * Constants 00011 ******************************************************/ 00012 // TODO: constants, used for iBeacon UUID(MSB first), Major, Minor and txpower setting 00013 00014 00015 /****************************************************** 00016 * Variables 00017 ******************************************************/ 00018 //microbit object 00019 MicroBit uBit; 00020 //Initial USB-to-Serial, baud rate is 9600-8-N-1 00021 Serial pcCom(USBTX, USBRX); 00022 00023 // TODO: global data and functions 00024 00025 00026 00027 /****************************************************** 00028 * Functions 00029 ******************************************************/ 00030 // TODO: functions, startAdvertising and stopAdvertising 00031 00032 00033 // TODO: functions, used for ButtonA and ButtonB interrupt callbacks 00034 00035 00036 int main() 00037 { 00038 // Serial output after a reset 00039 pcCom.printf("mBit Beacon.\n\r"); 00040 00041 // Initialize the micro:bit runtime. 00042 uBit.init(); 00043 00044 // TODO: Register the interrupt and callback for ButtonA and ButtonB 00045 00046 00047 // TODO: First Advertisment, adv name only 00048 00049 00050 release_fiber(); 00051 }
Generated on Fri Jul 22 2022 21:35:10 by
1.7.2
