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);
}
}
This topic was modified 1 week, 2 days ago by Giuseppe. Reason: Add link to photo
This topic was modified 1 week, 2 days ago by Giuseppe. Reason: Add link to photo
Maintaining a repository (or site or forum) is a lot like tending to a garden - it requires constant care and attention to keep it thriving. If you're a skilled gardener (or coder!) and want to help keep our repository blooming, we'd love to have you on board! We're also looking for talented writers and forum moderators to help us grow our community. Interested in joining our team? Don't hesitate to reach out and let us know how you can contribute!
Are you a fan of electronics or programming? Share your knowledge with others, write a simple tutorial or how to make a great project Contact me: share_your_ideas@mischianti.org