2015-05-18 21:25:09 +00:00
|
|
|
#include <BTstack.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <SPI.h>
|
|
|
|
|
2015-06-03 17:36:37 +00:00
|
|
|
/* EXAMPLE_START(iBeacon): iBeacon Simulator
|
|
|
|
*
|
|
|
|
* @section Setup
|
|
|
|
*
|
|
|
|
* @text After BTstack.setup(), iBeaconConfigure() configures BTstack
|
|
|
|
* to send out iBeacons Advertisements with the provided Major ID,
|
|
|
|
* Minor ID and UUID.
|
|
|
|
*/
|
|
|
|
/* LISTING_START(iBeaconSetup): iBeacon Setup */
|
2015-05-18 21:41:22 +00:00
|
|
|
UUID uuid("E2C56DB5-DFFB-48D2-B060-D0F5A71096E0");
|
2015-05-18 21:25:09 +00:00
|
|
|
void setup(void){
|
2015-05-29 18:46:52 +00:00
|
|
|
Serial.begin(9600);
|
2015-05-18 21:25:09 +00:00
|
|
|
BTstack.setup();
|
2015-06-03 17:36:37 +00:00
|
|
|
BTstack.iBeaconConfigure(&uuid, 4711, 2);
|
2015-05-18 21:25:09 +00:00
|
|
|
BTstack.startAdvertising();
|
|
|
|
}
|
2015-06-03 17:36:37 +00:00
|
|
|
/* LISTING_END(iBeaconSetup) */
|
2015-05-18 21:25:09 +00:00
|
|
|
|
|
|
|
void loop(void){
|
|
|
|
BTstack.loop();
|
|
|
|
}
|