E32 Shield on E220 | Help

Viewing 1 reply thread
  • Author
    Posts
    • #27430
      Giuseppe
      Participant

        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);
        }
        }

      • #27435
        Renzo Mischianti
        Keymaster

          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

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.
      Exit mobile version