Merge pull request #5 from flavienhaas/jdmassard-patch-1

Update name
This commit is contained in:
Flavien Haas 2018-06-20 14:18:49 +02:00 committed by GitHub
commit 44eb2060f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,15 +11,20 @@ uint16_t incrTS=0x0000;
void setup() {
SerialUSB.begin(9600);
SerialUSB.println("LoRa Sender");
thisLoRa.begin();
protocol.codeFrame(0x0B,0x00,0x0000,0x0001,0x0000,0x0000,0x0000);
protocol.codeFrame(0x0B,0x00,0x0000,0x00FF,0x5BA2,0x0D4C,0x9299); // Name : LORA-TEST1 or 0x929A for *2
LoRa.beginPacket();
LoRa.write((uint8_t*)&protocol, 12); // Send name
LoRa.endPacket();
}
void loop()
{
protocol.setDataOne((uint16_t)(random(500, 750)));
protocol.setDataTwo((uint16_t)(random(40, 60)));
protocol.setDataThree((uint16_t)(random(0, 1)));
protocol.setDataThree((uint16_t)(random(0, 2)));
incrTS = protocol.getTimestampMessage()+1;
protocol.setTimestampMessage(incrTS);
@ -47,4 +52,4 @@ void loop()
delay(4000);
}
delay(10000);
}
}