- This topic has 1 reply, 2 voices, and was last updated 1 year ago by .
- You must be logged in to reply to this topic.
Home › Forums › The libraries hosted on the site › EByte LoRa e32 UART devices sx1262/sx1268 › 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);
}
}
Hi Giuseppe,
I don’t know which shield you buy, but you can go to the article on the relative shield and get the constructor.
Bye Renzo
More
3D Printer 3D printer upgrade ABB Arduino Arduino IDE Arduino SAMD boards Aurora AWS CNC Cyclone PCB Factory Cyclone PCB Factory how to build It Display E32 E70 esp01 esp32 esp8266 File System Firmware i2c Library LoRa MicroPython Milling PCB My PCB Networking PCB pinout Power saving Programming board Raspberry Pi REST API RF rp2040 SD Card Sensors Sleep and Wake UP SPI STM32 Storage devices Temperature Tutorial Web Server Wemos D1 mini WiFi