Difference between Esp32 LoRa.write() and LoRa.print() commands

flavioavilela
Posts: 4
Joined: Sun Jul 05, 2020 12:45 am

Difference between Esp32 LoRa.write() and LoRa.print() commands

Postby flavioavilela » Wed Sep 23, 2020 11:54 pm

Hi everyone.
What is difference between LoRa.write() and LoRa.print()?
I noticed this two commands send data package to LoRa network, but if I send message by LoRa.write(), the receiver side receive a strange characters.

wantanhoe
Posts: 1
Joined: Thu Nov 02, 2023 6:59 pm

Re: Difference between Esp32 LoRa.write() and LoRa.print() commands

Postby wantanhoe » Thu Nov 02, 2023 7:01 pm

Hello. Im having the same problem with not knowing which one to use. Have you found the answer to use for this?

koushik
Posts: 1
Joined: Fri Mar 29, 2024 4:59 am

Re: Difference between Esp32 LoRa.write() and LoRa.print() commands

Postby koushik » Fri Mar 29, 2024 5:20 am

LoRa.write(byte) sends a single byte as given in docs - https://github.com/sandeepmistry/arduin ... md#writing
LoRa.read() reads single byte from packet - https://github.com/sandeepmistry/arduin ... md#reading
On the receiver side -> byte data = LoRa.read();
then you can change the byte to a HEX string using String(data, HEX);

Who is online

Users browsing this forum: No registered users and 93 guests