show received raw beacons
rodzic
e0b53577fd
commit
ef3c3a22d4
|
@ -181,6 +181,7 @@ boolean wx;
|
||||||
|
|
||||||
//byte arrays
|
//byte arrays
|
||||||
byte lora_TXBUFF[128]; //buffer for packet to send
|
byte lora_TXBUFF[128]; //buffer for packet to send
|
||||||
|
byte lora_RXBUFF[128]; //buffer for packet to send
|
||||||
//byte Variables
|
//byte Variables
|
||||||
byte lora_TXStart; //start of packet data in TXbuff
|
byte lora_TXStart; //start of packet data in TXbuff
|
||||||
byte lora_TXEnd; //end of packet data in TXbuff
|
byte lora_TXEnd; //end of packet data in TXbuff
|
||||||
|
@ -436,7 +437,7 @@ void setup()
|
||||||
void loop() {
|
void loop() {
|
||||||
if (digitalRead(BUTTON)==LOW) {
|
if (digitalRead(BUTTON)==LOW) {
|
||||||
++button_ctr;
|
++button_ctr;
|
||||||
if (button_ctr>=5){
|
if (button_ctr>=5) {
|
||||||
switch(tracker_mode) {
|
switch(tracker_mode) {
|
||||||
case TRACKER:
|
case TRACKER:
|
||||||
tracker_mode = WX_TRACKER;
|
tracker_mode = WX_TRACKER;
|
||||||
|
@ -480,7 +481,7 @@ void loop() {
|
||||||
button_ctr = 0;
|
button_ctr = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hum_temp) {
|
if (hum_temp) {
|
||||||
hum_temp=false;
|
hum_temp=false;
|
||||||
#ifdef DS18B20
|
#ifdef DS18B20
|
||||||
sensors.requestTemperatures(); // Send the command to get temperature readings
|
sensors.requestTemperatures(); // Send the command to get temperature readings
|
||||||
|
@ -504,7 +505,14 @@ void loop() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rf95.waitAvailableTimeout(100)) {
|
if (rf95.waitAvailableTimeout(100)) {
|
||||||
if (rf95.recvAPRS(buf, &len)) {
|
if (rf95.recvAPRS(lora_RXBUFF, &len)) {
|
||||||
|
Serial.print("((RX)): ");
|
||||||
|
InputString = "";
|
||||||
|
for ( int i=0 ; i < len ; i++) {
|
||||||
|
InputString += (char) lora_RXBUFF[i];
|
||||||
|
}
|
||||||
|
Serial.println(InputString);
|
||||||
|
writedisplaytext(" ((RX))","",InputString,"","","",2000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue