From bc918f48f8d5bbe18406546cd222931fe2dc7a5d Mon Sep 17 00:00:00 2001 From: Jean-Daniel Massard <36268067+jdmassard@users.noreply.github.com> Date: Wed, 20 Jun 2018 08:37:06 +0200 Subject: [PATCH] Update name --- fakeStation/fakeStation.ino | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fakeStation/fakeStation.ino b/fakeStation/fakeStation.ino index 4dac6d5..59b5243 100644 --- a/fakeStation/fakeStation.ino +++ b/fakeStation/fakeStation.ino @@ -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); -} +}