KrisKasprzak / EBYTE

Libraries to program and use UART-based EBYTE wireless data transceivers
239 stars 75 forks source link

EBYTE.h & WIRE.h #40

Closed Lucamenghini closed 2 years ago

Lucamenghini commented 3 years ago

Hi Kris another issue. I defined:

include "EBYTE.h"

include "Wire.h"

include "SHT31.h"

define SHT31_ADDRESS 0x44

SHT31 sht;

and in the setup i setted: Wire.begin(); sht.begin(SHT31_ADDRESS); Wire.setClock(100000);

I've got to use EBYTE to transmit, Wire to set the clock and sht31.h to manage a umidity&temeprature sensor.

I debugged the sketch because the transmitting doesn't work and I found that the line "Wire.begin();" doesn't not permit the transceiver to work How can I solve? please help me thank you bye

the complete sketch here:

include "EBYTE.h"

include "Wire.h"

include "SHT31.h"

// definizioni per SHT30

define SHT31_ADDRESS 0x44

uint32_t start; uint32_t stop; SHT31 sht; uint32_t connectionFails = 0;

// altre definizioni String strid = "";

/ WARNING: IF USING AN ESP32 DO NOT USE THE PIN NUMBERS PRINTED ON THE BOARD YOU MUST USE THE ACTUAL GPIO NUMBER /

define PIN_RX 16 // Serial2 RX (connect this to the EBYTE Tx pin)

define PIN_TX 17 // Serial2 TX pin (connect this to the EBYTE Rx pin)

define PIN_M0 4 // D4 on the board (possibly pin 24)

define PIN_M1 22 // D2 on the board (possibly called pin 22)

define PIN_AX 21 // D15 on the board (possibly called pin 21)

// i recommend putting this code in a .h file and including it // from both the receiver and sender modules struct DATA { unsigned long Count; int Bits; float Volts; float Amps;

};

int Chan; DATA MyData; unsigned long Last; EBYTE Transceiver(&Serial2, PIN_M0, PIN_M1, PIN_AX);

void setup() { Serial.begin(9600); Serial2.begin(9600); Serial.println("Starting Reader"); Serial.println(Transceiver.init()); Transceiver.PrintParameters();

// GESTIONE SHT30 Serial.println("Inizializzazione SHT30"); Serial.println(FILE); Serial.print("SHT31_LIB_VERSION: \t"); Serial.println(SHT31_LIB_VERSION); Wire.begin(); sht.begin(SHT31_ADDRESS); Wire.setClock(100000); uint16_t stat = sht.readStatus(); Serial.print(stat, HEX); Serial.println();

//inizializzo LORA

strid=getMacAddress(); Serial.println(strid); }

void loop() { // lettura dati SHT31 if ( sht.isConnected() ) { start = micros(); sht.read(); // default = true/fast slow = false stop = micros();

Serial.print("Temperatura : ");
Serial.print(sht.getTemperature(), 1);
Serial.println(" °C");
Serial.print("Umidità : ");
Serial.print(sht.getHumidity(), 1);
Serial.println(" %");

} else { connectionFails++; Serial.print(millis()); Serial.print("\tNot connected:\t"); Serial.print(connectionFails); // sht.reset(); } // delay di 2 secondi con a capo Serial.println();

// measure some data and save to the structure MyData.Count++; MyData.Bits=(sht.getTemperature(), 1); MyData.Volts=(sht.getHumidity(), 1);

// i highly suggest you send data using structures and not // a parsed data--i've always had a hard time getting reliable data using // a parsing method Transceiver.SendStruct(&MyData, sizeof(MyData));

// note, you only really need this library to program these EBYTE units
// you can call write directly on the EBYTE Serial object
// Serial2.write((uint8_t*) &Data, PacketSize );

// let the use know something was sent Serial.print("Sending: "); Serial.println(MyData.Count); delay(100); }

// FUNZIONE CHE RITORNA UN id UNIVOCO PER SCHEDA String getMacAddress() { uint8_t baseMac[6]; // Get MAC address for WiFi station esp_read_mac(baseMac, ESP_MAC_WIFI_STA); char baseMacChr[18] = {0}; sprintf(baseMacChr, "%02X:%02X:%02X:%02X:%02X:%02X", baseMac[0], baseMac[1], baseMac[2], baseMac[3], baseMac[4], baseMac[5]); String ris=String(baseMacChr); ris.replace(":",""); return String(ris); }

KrisKasprzak commented 3 years ago

I doubt this will work but change the order

include "Wire.h"

include "EBYTE.h"

and try reordering the begins Wire.begin();Serial.begin(9600); Serial2.begin(9600);

Thanks, Kris @.***

On Thursday, August 19, 2021, 05:50:21 PM CDT, Lucamenghini ***@***.***> wrote:  

Hi Kris another issue. I defined:

include "EBYTE.h"

include "Wire.h"

include "SHT31.h"

define SHT31_ADDRESS 0x44

SHT31 sht;

and in the setup i setted: Wire.begin(); sht.begin(SHT31_ADDRESS); Wire.setClock(100000);

I've got to use EBYTE to transmit, Wire to set the clock and sht31.h to manage a umidity&temeprature sensor.

I debugged the sketch because the transmitting doesn't work and I found that the line "Wire.begin();" doesn't not permit the transceiver to work How can I solve? please help me thank you bye

the complete sketch here:

include "EBYTE.h"

include "Wire.h"

include "SHT31.h"

// definizioni per SHT30

define SHT31_ADDRESS 0x44

uint32_t start; uint32_t stop; SHT31 sht; uint32_t connectionFails = 0;

// altre definizioni String strid = "";

/ WARNING: IF USING AN ESP32 DO NOT USE THE PIN NUMBERS PRINTED ON THE BOARD YOU MUST USE THE ACTUAL GPIO NUMBER /

define PIN_RX 16 // Serial2 RX (connect this to the EBYTE Tx pin)

define PIN_TX 17 // Serial2 TX pin (connect this to the EBYTE Rx pin)

define PIN_M0 4 // D4 on the board (possibly pin 24)

define PIN_M1 22 // D2 on the board (possibly called pin 22)

define PIN_AX 21 // D15 on the board (possibly called pin 21)

// i recommend putting this code in a .h file and including it // from both the receiver and sender modules struct DATA { unsigned long Count; int Bits; float Volts; float Amps;

};

int Chan; DATA MyData; unsigned long Last; EBYTE Transceiver(&Serial2, PIN_M0, PIN_M1, PIN_AX);

void setup() { Serial.begin(9600); Serial2.begin(9600); Serial.println("Starting Reader"); Serial.println(Transceiver.init()); Transceiver.PrintParameters();

// GESTIONE SHT30 Serial.println("Inizializzazione SHT30"); Serial.println(FILE); Serial.print("SHT31_LIB_VERSION: \t"); Serial.println(SHT31_LIB_VERSION); Wire.begin(); sht.begin(SHT31_ADDRESS); Wire.setClock(100000); uint16_t stat = sht.readStatus(); Serial.print(stat, HEX); Serial.println(); //inizializzo LORA

strid=getMacAddress(); Serial.println(strid); }

void loop() { // lettura dati SHT31 if ( sht.isConnected() ) { start = micros(); sht.read(); // default = true/fast slow = false stop = micros(); Serial.print("Temperatura : "); Serial.print(sht.getTemperature(), 1); Serial.println(" °C"); Serial.print("Umidità : "); Serial.print(sht.getHumidity(), 1); Serial.println(" %");

} else { connectionFails++; Serial.print(millis()); Serial.print("\tNot connected:\t"); Serial.print(connectionFails); // sht.reset(); } // delay di 2 secondi con a capo Serial.println();

// measure some data and save to the structure MyData.Count++; MyData.Bits=(sht.getTemperature(), 1); MyData.Volts=(sht.getHumidity(), 1);

// i highly suggest you send data using structures and not // a parsed data--i've always had a hard time getting reliable data using // a parsing method Transceiver.SendStruct(&MyData, sizeof(MyData)); // note, you only really need this library to program these EBYTE units // you can call write directly on the EBYTE Serial object // Serial2.write((uint8_t*) &Data, PacketSize );

// let the use know something was sent Serial.print("Sending: "); Serial.println(MyData.Count); delay(100); }

// FUNZIONE CHE RITORNA UN id UNIVOCO PER SCHEDA String getMacAddress() { uint8_t baseMac[6]; // Get MAC address for WiFi station esp_read_mac(baseMac, ESP_MAC_WIFI_STA); char baseMacChr[18] = {0}; sprintf(baseMacChr, "%02X:%02X:%02X:%02X:%02X:%02X", baseMac[0], baseMac[1], baseMac[2], baseMac[3], baseMac[4], baseMac[5]); String ris=String(baseMacChr); ris.replace(":",""); return String(ris); }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

KrisKasprzak commented 3 years ago

reversing order will probably not work, stuff to try

  1. do you have to use wire.h? what happens if you exclude it? It looks like wire.h is either hihakking the serial port--the one the EBYTE needs or it's altering the clock frequency.
  2. try #include 3. Maybe even try wire.end(); before sending data (with some small delay)then after sending data, start the wire back up with wire.begin(); I have an ESP32 that uses and EBYTE and a dallas temp sensor and I'm using OneWire.h. The only reason I use and ESP32 as there is good support for connecting to an internet and hosting web pages--but honestly I avoid Arduinos and ESP's at all costs as there is just too many issues with those MCU's.  I use Teensy's exclusively, I have several serial devices connected to a Teensy 3.2 and worked the first time and every time--i'm not using wire.h though. Arduino UART is a mess and ESP is not much better Thanks,

    On Thursday, August 19, 2021, 05:50:21 PM CDT, Lucamenghini @.***> wrote:

Hi Kris another issue. I defined:

include "EBYTE.h"

include "Wire.h"

include "SHT31.h"

define SHT31_ADDRESS 0x44

SHT31 sht;

and in the setup i setted: Wire.begin(); sht.begin(SHT31_ADDRESS); Wire.setClock(100000);

I've got to use EBYTE to transmit, Wire to set the clock and sht31.h to manage a umidity&temeprature sensor.

I debugged the sketch because the transmitting doesn't work and I found that the line "Wire.begin();" doesn't not permit the transceiver to work How can I solve? please help me thank you bye

the complete sketch here:

include "EBYTE.h"

include "Wire.h"

include "SHT31.h"

// definizioni per SHT30

define SHT31_ADDRESS 0x44

uint32_t start; uint32_t stop; SHT31 sht; uint32_t connectionFails = 0;

// altre definizioni String strid = "";

/ WARNING: IF USING AN ESP32 DO NOT USE THE PIN NUMBERS PRINTED ON THE BOARD YOU MUST USE THE ACTUAL GPIO NUMBER /

define PIN_RX 16 // Serial2 RX (connect this to the EBYTE Tx pin)

define PIN_TX 17 // Serial2 TX pin (connect this to the EBYTE Rx pin)

define PIN_M0 4 // D4 on the board (possibly pin 24)

define PIN_M1 22 // D2 on the board (possibly called pin 22)

define PIN_AX 21 // D15 on the board (possibly called pin 21)

// i recommend putting this code in a .h file and including it // from both the receiver and sender modules struct DATA { unsigned long Count; int Bits; float Volts; float Amps;

};

int Chan; DATA MyData; unsigned long Last; EBYTE Transceiver(&Serial2, PIN_M0, PIN_M1, PIN_AX);

void setup() { Serial.begin(9600); Serial2.begin(9600); Serial.println("Starting Reader"); Serial.println(Transceiver.init()); Transceiver.PrintParameters();

// GESTIONE SHT30 Serial.println("Inizializzazione SHT30"); Serial.println(FILE); Serial.print("SHT31_LIB_VERSION: \t"); Serial.println(SHT31_LIB_VERSION); Wire.begin(); sht.begin(SHT31_ADDRESS); Wire.setClock(100000); uint16_t stat = sht.readStatus(); Serial.print(stat, HEX); Serial.println(); //inizializzo LORA

strid=getMacAddress(); Serial.println(strid); }

void loop() { // lettura dati SHT31 if ( sht.isConnected() ) { start = micros(); sht.read(); // default = true/fast slow = false stop = micros(); Serial.print("Temperatura : "); Serial.print(sht.getTemperature(), 1); Serial.println(" °C"); Serial.print("Umidità : "); Serial.print(sht.getHumidity(), 1); Serial.println(" %");

} else { connectionFails++; Serial.print(millis()); Serial.print("\tNot connected:\t"); Serial.print(connectionFails); // sht.reset(); } // delay di 2 secondi con a capo Serial.println();

// measure some data and save to the structure MyData.Count++; MyData.Bits=(sht.getTemperature(), 1); MyData.Volts=(sht.getHumidity(), 1);

// i highly suggest you send data using structures and not // a parsed data--i've always had a hard time getting reliable data using // a parsing method Transceiver.SendStruct(&MyData, sizeof(MyData)); // note, you only really need this library to program these EBYTE units // you can call write directly on the EBYTE Serial object // Serial2.write((uint8_t*) &Data, PacketSize );

// let the use know something was sent Serial.print("Sending: "); Serial.println(MyData.Count); delay(100); }

// FUNZIONE CHE RITORNA UN id UNIVOCO PER SCHEDA String getMacAddress() { uint8_t baseMac[6]; // Get MAC address for WiFi station esp_read_mac(baseMac, ESP_MAC_WIFI_STA); char baseMacChr[18] = {0}; sprintf(baseMacChr, "%02X:%02X:%02X:%02X:%02X:%02X", baseMac[0], baseMac[1], baseMac[2], baseMac[3], baseMac[4], baseMac[5]); String ris=String(baseMacChr); ris.replace(":",""); return String(ris); }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

Lucamenghini commented 3 years ago

Hi I tried to exclude the wire.h and the sensor works properly and the measurement of temperature & umidity are perfect the same. But the E32 continue not working. The sensor is OK but it doesn't transmitt, the code is here, what could I do anymore?

include "EBYTE.h"

include "SHT31.h"

// SHT30 definitions

define SHT31_ADDRESS 0x44

uint32_t start; uint32_t stop; SHT31 sht; uint32_t connectionFails = 0;

// board ID String strid = "";

define PIN_RX 16 // Serial2 RX (connect this to the EBYTE Tx pin)

define PIN_TX 17 // Serial2 TX pin (connect this to the EBYTE Rx pin)

define PIN_M0 4 // D4 on the board (possibly pin 24)

define PIN_M1 22 // D2 on the board (possibly called pin 22)

define PIN_AX 21 // D15 on the board (possibly called pin 21)

struct DATA { unsigned long Count; int Bits; float Volts; float Amps;

}; int Chan; DATA MyData; unsigned long Last;

EBYTE Transceiver(&Serial2, PIN_M0, PIN_M1, PIN_AX);

void setup() { Serial.begin(115200); Serial2.begin(9600); Serial.println("Starting Reader"); Serial.println(Transceiver.init()); Transceiver.SetAirDataRate( ADR_300); // 300, 1200, 2400 (default), 4800, 9600, 19200 baud rate Transceiver.SaveParameters(PERMANENT); Transceiver.PrintParameters();

// SHT30 Serial.println("Inizializzazione SHT30"); Serial.println(FILE); Serial.print("SHT31_LIB_VERSION: \t"); Serial.println(SHT31_LIB_VERSION); sht.begin(SHT31_ADDRESS); uint16_t stat = sht.readStatus(); Serial.print(stat, HEX); Serial.println(); // UID strid=getMacAddress(); Serial.print("ID-SCHEDA: "); Serial.println(strid); }

void loop() { if ( sht.isConnected() ) { start = micros(); sht.read(); // default = true/fast slow = false stop = micros(); Serial.print("Temperatura : "); Serial.print(sht.getTemperature(), 1); Serial.println(" °C"); Serial.print("Umidità : "); Serial.print(sht.getHumidity(), 1); Serial.println(" %"); } else { connectionFails++; Serial.print(millis()); Serial.print("\tNot connected:\t"); Serial.print(connectionFails); // sht.reset(); }

// data structure MyData.Count++; MyData.Bits=(sht.getTemperature(), 1); MyData.Volts=(sht.getHumidity(), 1); Transceiver.SendStruct(&MyData, sizeof(MyData)); Serial.print("Sending: "); Serial.println(MyData.Count); delay(3000); }

// uid function String getMacAddress() { uint8_t baseMac[6]; // Get MAC address for WiFi station esp_read_mac(baseMac, ESP_MAC_WIFI_STA); char baseMacChr[18] = {0}; sprintf(baseMacChr, "%02X:%02X:%02X:%02X:%02X:%02X", baseMac[0], baseMac[1], baseMac[2], baseMac[3], baseMac[4], baseMac[5]); String ris=String(baseMacChr); ris.replace(":",""); return String(ris); }

Lucamenghini commented 3 years ago

Update on the last post above: I tried to switch on and then switch off the sht and then the Transceiver switch on and then switch off (init .... stuff .... reset) But nothing changes, the transceiver appears not available when SHT.begin(ADDRESS) is previously executed. Thanks Kris for your support Bye

include "EBYTE.h"

include "SHT31.h"

// definizioni per SHT30

define SHT31_ADDRESS 0x44

uint32_t start; uint32_t stop; SHT31 sht; uint32_t connectionFails = 0;

// altre definizioni String strid = "";

define PIN_RX 16 // Serial2 RX (connect this to the EBYTE Tx pin)

define PIN_TX 17 // Serial2 TX pin (connect this to the EBYTE Rx pin)

define PIN_M0 4 // D4 on the board (possibly pin 24)

define PIN_M1 22 // D2 on the board (possibly called pin 22)

define PIN_AX 21 // D15 on the board (possibly called pin 21)

//variabili di passaggio temp e umid float temp; float umid;

struct DATA { unsigned long Count; int Bits; float Volts; float Amps;

};

// these are just dummy variables, replace with your own int Chan; DATA MyData; unsigned long Last;

// create the transceiver object, passing in the serial and pins EBYTE Transceiver(&Serial2, PIN_M0, PIN_M1, PIN_AX);

void setup() { Serial.begin(115200); Serial2.begin(9600); Serial.println("Starting Reader");

// GESTIONE SHT30 Serial.println("Inizializzazione SHT30"); Serial.println(FILE); Serial.print("SHT31_LIB_VERSION: \t"); Serial.println(SHT31_LIB_VERSION); sht.begin(SHT31_ADDRESS); // <------ this line block the transceiver uint16_t stat = sht.readStatus(); Serial.print(stat, HEX); Serial.println(); sht.reset();

strid=getMacAddress(); Serial.print("ID-SCHEDA: "); Serial.println(strid);

Serial.println(Transceiver.init()); Transceiver.SetAirDataRate( ADR_300); // 300, 1200, 2400 (default), 4800, 9600, 19200 baud rate Transceiver.SaveParameters(PERMANENT); Transceiver.PrintParameters(); Transceiver.Reset(); }

void loop() { //SHT management sht.begin(SHT31_ADDRESS); delay(200); if ( sht.isConnected() ) { start = micros(); sht.read(); // default = true/fast slow = false stop = micros(); //storing temp & umid data temp=sht.getTemperature(); umid=sht.getHumidity(); Serial.print("Temperatura : "); Serial.print(temp, 1); Serial.println(" °C"); Serial.print("Umidità : "); Serial.print(umid, 1); Serial.println(" %"); } else { connectionFails++; Serial.print(millis()); Serial.print("\tNot connected:\t"); Serial.print(connectionFails); // sht.reset(); } sht.reset();

MyData.Count++; MyData.Bits=(temp, 1); MyData.Volts=(umid, 1);

Serial.println(Transceiver.init()); Transceiver.SetAirDataRate( ADR_300); // 300, 1200, 2400 (default), 4800, 9600, 19200 baud rate Transceiver.SaveParameters(PERMANENT); Transceiver.PrintParameters(); if (Transceiver.available() ) { Serial.println("Transceiver available!!"); Transceiver.SendStruct(&MyData, sizeof(MyData)); } else { Serial.println("Transceiver not available"); } Transceiver.Reset();

Serial.print("Sending: "); Serial.println(MyData.Count); delay(3000); }

// FUNZIONE CHE RITORNA UN id UNIVOCO PER SCHEDA String getMacAddress() { uint8_t baseMac[6]; // Get MAC address for WiFi station esp_read_mac(baseMac, ESP_MAC_WIFI_STA); char baseMacChr[18] = {0}; sprintf(baseMacChr, "%02X:%02X:%02X:%02X:%02X:%02X", baseMac[0], baseMac[1], baseMac[2], baseMac[3], baseMac[4], baseMac[5]); String ris=String(baseMacChr); ris.replace(":",""); return String(ris); }

KrisKasprzak commented 2 years ago

see below (my comments preceded with \\\\\) Thanks, Kris  On Sunday, August 22, 2021, 05:05:11 PM CDT, Lucamenghini @.***> wrote:

Hi I tried to exclude the wire.h and the sensor works properly and the measurement of temperature & umidity are perfect the same. But the E32 continue not working. The sensor is OK but it doesn't transmitt, the code is here, what could I do anymore?

include "EBYTE.h"

include "SHT31.h"

// SHT30 definitions

define SHT31_ADDRESS 0x44

uint32_t start; uint32_t stop; SHT31 sht; uint32_t connectionFails = 0;

// board ID  \\\\\ this is probably not the problem but you should never use String--this data type \\\\\ is poorly implemented and will fragment memory String strid = "";

define PIN_RX 16 // Serial2 RX (connect this to the EBYTE Tx pin)

define PIN_TX 17 // Serial2 TX pin (connect this to the EBYTE Rx pin)

define PIN_M0 4 // D4 on the board (possibly pin 24)

define PIN_M1 22 // D2 on the board (possibly called pin 22)

define PIN_AX 21 // D15 on the board (possibly called pin 21)

struct DATA { unsigned long Count; int Bits; float Volts; float Amps;

}; int Chan; DATA MyData; unsigned long Last;

EBYTE Transceiver(&Serial2, PIN_M0, PIN_M1, PIN_AX);

void setup() { Serial.begin(115200); Serial2.begin(9600); Serial.println("Starting Reader");

Serial.println(Transceiver.init());

 \\\\\ I'm surprised you get reliable data transfer at 300 baud. waiting 3 seconds is the reason  \\\\\ but a very slow rate. if it works, great, if data doesn't transmit, this is where I would start Transceiver.SetAirDataRate( ADR_300); // 300, 1200, 2400 (default), 4800, 9600, 19200 baud rate  \\\\\ you only need to call SetAirDataRate and save once, after this call, data is permamentely  \\\\\ stored in the EBYTE Transceiver.SaveParameters(PERMANENT); Transceiver.PrintParameters();

// SHT30 Serial.println("Inizializzazione SHT30"); Serial.println(FILE); Serial.print("SHT31_LIB_VERSION: \t"); Serial.println(SHT31_LIB_VERSION); sht.begin(SHT31_ADDRESS); uint16_t stat = sht.readStatus(); Serial.print(stat, HEX); Serial.println(); // UID strid=getMacAddress(); Serial.print("ID-SCHEDA: "); Serial.println(strid); }

void loop() { if ( sht.isConnected() ) { start = micros(); sht.read(); // default = true/fast slow = false stop = micros(); Serial.print("Temperatura : "); Serial.print(sht.getTemperature(), 1); Serial.println(" °C"); Serial.print("Umidità : "); Serial.print(sht.getHumidity(), 1); Serial.println(" %"); } else { connectionFails++; Serial.print(millis()); Serial.print("\tNot connected:\t"); Serial.print(connectionFails); // sht.reset(); }

// data structure

MyData.Count++;  \\\\\ what data type is getTemperature returning? probably a float right?  \\\\\  what datatype is .Bits?  \\\\\ this must get fixed MyData.Bits=(sht.getTemperature(), 1); MyData.Volts=(sht.getHumidity(), 1); Transceiver.SendStruct(&MyData, sizeof(MyData)); Serial.print("Sending: "); Serial.println(MyData.Count); delay(3000); }

// uid function  \\\\\ i'll admint dealing with chars is a pain, but strings are badString getMacAddress() { uint8_t baseMac[6]; // Get MAC address for WiFi station esp_read_mac(baseMac, ESP_MAC_WIFI_STA); char baseMacChr[18] = {0}; sprintf(baseMacChr, "%02X:%02X:%02X:%02X:%02X:%02X", baseMac[0], baseMac[1], baseMac[2], baseMac[3], baseMac[4], baseMac[5]); String ris=String(baseMacChr); ris.replace(":",""); return String(ris); }

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

KrisKasprzak commented 2 years ago

Try without the library. If the transceivers still don't work there is an issue with your hardware.

You only really need this library to program these EBYTE units. For reading data structures, you can call readBytes directly on the EBYTE Serial object

ESerial.readBytes((uint8_t*)& MyData, (uint8_t) sizeof(MyData));

for writing data structures you can call write directly on the EBYTE Serial object

ESerial.write((uint8_t*) &Data, PacketSize );