Original library sources.

This commit is contained in:
2018-07-20 20:21:55 +02:00
parent 87830b42e3
commit 9e41194f84
9 changed files with 1277 additions and 17 deletions

30
examples/recv/recv.ino Normal file
View File

@ -0,0 +1,30 @@
#include <SPI.h>
#include <RF24.h>
#include <BTLE.h>
RF24 radio(9,10);
BTLE btle(&radio);
void setup() {
Serial.begin(9600);
while (!Serial) { }
Serial.println("BTLE advertisement receiver");
btle.begin("");
}
void loop() {
Serial.print("Listening... ");
if (btle.listen()) {
Serial.print("Got payload: ");
for (uint8_t i = 0; i < (btle.buffer.pl_size)-6; i++) { Serial.print(btle.buffer.payload[i],HEX); Serial.print(" "); }
}
Serial.println("done.");
btle.hopChannel();
}