gutierrezps / gwiot7941e

A simple library to interface with Gwiot 7941E RFID reader
GNU General Public License v3.0
7 stars 5 forks source link

Error if (softwareSerial_) softwareSerial_->end(); in compile #5

Closed kauaenrico closed 1 year ago

kauaenrico commented 1 year ago

Hello! I'm testing the module I bought... I copied the basic code from your github, but when I try to compile it, it gives an error in the library code. Would you help me?

Code used:

#include <Gwiot7941e.h>
#define GWIOT_7941E_RX_PIN 4
Gwiot7941e gwiot7941e;
void setup()
{
    //...
    gwiot7941e.begin(GWIOT_7941E_RX_PIN);
    //...
}
void loop()
{
    //...
    if (gwiot7941e.update()) {
        Serial.println(gwiot7941e.getLastTagId(), HEX);
    }
    //...
}

Error: image

gutierrezps commented 1 year ago

Hello Kauã!

It's been some time since I've worked with embedded software. I've downloaded the latest Arduino IDE legacy version (1.8.19), the latest ESP8266 Arduino core (3.0.2), selected the NodeMCU 1.0 board (as shown on your screenshot) and compiled the read_to_serial example without changing anything, and it worked.

image

image

Can you please check your ESP8266 Arduino core version? And also post the entire source code?

kauaenrico commented 1 year ago

Hello again! I reinstalled my Arduino IDE and the libraries for the ESP, and it worked perfectly! Thank you for your help!