Commit 30d1ef65 authored by Giacomo Lavermicocca's avatar Giacomo Lavermicocca

Prj begin of bidirectional comunication

parent b9e8c088
......@@ -86,10 +86,14 @@ void onReceive(int packetSize)
//digitalWrite(RELE_2, LOW); // turn the LED on (HIGH is the voltage level)
digitalWrite(25, HIGH); // turn the LED on (HIGH is the voltage level)
// LoRa.beginPacket();
// LoRa.print("hello ");
// LoRa.print(counter%=2);
// LoRa.endPacket();
delay(2000);
LoRa.beginPacket();
LoRa.print("hello ");
LoRa.print(counter%=2);
LoRa.endPacket();
// put the radio into receive mode
LoRa.receive();
counter++;
......
......@@ -149,7 +149,7 @@ void loop(void)
LoRa.endPacket();
// put the radio into receive mode
//LoRa.receive();
LoRa.receive();
counter++;
digitalWrite(25, HIGH); // turn the LED on (HIGH is the voltage level)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment