Site icon Renzo Mischianti

E32 Shield on E220 | Help

Hello, I have bought the shield that you sell for the E32 EBYTE, but I am using it with an E220, I am modifying the basic code so that it receives and sends simple messages, but I cannot do it, I attach the code. #include "Arduino.h" #include "LoRa_E220.h" LoRa_E220 e220ttl100(3, 4); // e32 TX e32 RX void setup() { Serial.begin(9600); delay(500); Serial.println("Hi, I'm going to send message!"); // Startup all pins and UART e220ttl100.begin(); // Send message ResponseStatus rs = e220ttl100.sendMessage("Hello, world?"); // Check If there is some problem of successfully send Serial.println(rs.getResponseDescription()); } void loop() { // If something available if (e220ttl100.available()>1) { // read the String message ResponseContainer rc = e220ttl100.receiveMessage(); // Is something goes wrong print error if (rc.status.code!=1){ rc.status.getResponseDescription(); }else{ // Print the data received Serial.println(rc.data); } } if (Serial.available()) { String input = Serial.readString(); e220ttl100.sendMessage(input); } }
Exit mobile version