Search code examples
arduinoarduino-unolora

Lora E45-TTL-100 Basic Arduino setup


I used this code to send data from the Arduino board to LoRa E45-TTL. The board seems to transmit data, but the receiving node doesn't seem to receive data. I am a real beginner to LoRa technology and any help is highly appreciated. The sending and receiving node codes I used are below:

Sender Node

void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("000106,supun");
  delay(2000);
}

Receiver Node

void setup() {
  Serial.begin(9600);
}

void loop() {
  if(Serial.available()) {
    char x=Serial.read();
    Serial.println(x);
    delay(200);
  }
}

Solution

  • This post mentions a similar problem, with a hackish solution to close Serial and re-open it.

    void loop() {
        Serial.print("Test");
        Serial.end();
        delay(30);
        Serial.begin(9600);
        delay(70); //The rest of requested delay. So 100 - 30 = 70
    }