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

Prj begin of bidirectional comunication

parent b9e8c088
Loading
Loading
Loading
Loading
+8 −4
Changes for LoRaReceiverInterrupt/LoRaReceiverInterrupt.ino: 8 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -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++;
    
+1 −1
Changes for LoRaSender/LoRaSender.ino: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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)