Skip to content

Commit

Permalink
- Eddystone URL beacon example
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepmistry committed Jul 15, 2015
1 parent e7d1aee commit 808e1f7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions examples/Eddystone/EddystoneURL/EddystoneURL.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// 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);

void setup() {
Serial.begin(9600);

delay(1000);

eddystoneBeacon.begin(0x20, "http://www.example.com"); // power, URI

Serial.println(F("Eddystone URL Beacon"));
}

void loop() {
eddystoneBeacon.loop();
}

0 comments on commit 808e1f7

Please sign in to comment.