forked from sandeepmistry/arduino-BLEPeripheral
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a48882
commit e7d1aee
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Import libraries (EddystoneBeacon depends on SPI) | ||
#include <SPI.h> | ||
#include <EddystoneBeacon.h> | ||
|
||
// define pins (varies per shield/board) | ||
// | ||
// Adafruit Bluefruit LE 10, 2, 9 | ||
// Blend 9, 8, UNUSED | ||
// Blend Micro 6, 7, 4 | ||
// RBL BLE Shield 9, 8, UNUSED | ||
|
||
#define EDDYSTONE_BEACON_REQ 6 | ||
#define EDDYSTONE_BEACON_RDY 7 | ||
#define EDDYSTONE_BEACON_RST 4 | ||
|
||
EddystoneBeacon eddystoneBeacon = EddystoneBeacon(EDDYSTONE_BEACON_REQ, EDDYSTONE_BEACON_RDY, EDDYSTONE_BEACON_RST); | ||
BLEUuid uid = BLEUuid("01020304050607080910-AABBCCDDEEFF"); // <namespace id>-<instance id> | ||
|
||
void setup() { | ||
Serial.begin(9600); | ||
|
||
eddystoneBeacon.begin(0x20, uid); // power, UID | ||
|
||
Serial.println(F("Eddystone UID Beacon")); | ||
} | ||
|
||
void loop() { | ||
eddystoneBeacon.loop(); | ||
} |