B4R Question [RESOLVED] esp32 espsoftwareserial - cannot get it to work

Hilton

Active Member
Licensed User
Longtime User
Hi folks,

Some background:
We have developed a system that contains a tablet using b4a, arduino mega 256 using b4r and 5 tf03 lidars.
The mega uses softwareserial to talk to the lidars. It catches info from the lidars and via hc-05 sends the data
to a tablet with a b4a app which visualises what is happening for the person running the system.

A prototype is being installed in the next couple of weeks and will do some 3 months trialling, after which we
hope it will become commercial.

Being something of a novice in things iot, I noticed the esp32 and decided to it out. I discovered that I could
1. Create a wifi network of 4 esp32's each controlling a lidar and send the data to a tablet using the wifi network,
UDP and Mqtt to move data around.
2. Do the same as above but without Mqtt, but using UDP only.

The obvious next step is to try to get an esp32 to control 5 lidars using softwareserial in exactly the same
fashion as the arduino version. Unfortunately, I have been singularly unsuccessful in getting the espsoftwareserial
to work. I want everything to work in b4r because I like the b4x stuff and have no interest in learning anything else.
I can look at c and get an idea of what is happening, but that is all.

I was wondering if anyone was using espsoftwareserial via rSoftwareSerial and could point me in the right direction.

Thank you,
Hilton.
 
Last edited:

Hilton

Active Member
Licensed User
Longtime User
Yes, you are correct, but i need 5 serials working at the same time as per the arduino mega that we are presently using.
 
Upvote 0

Hilton

Active Member
Licensed User
Longtime User
Two options. Use CAN bus or RS485 with RS485/RS232 converters
Thank you very much for the suggestions. I have no experience with either, but will do my home work and give them a shot. It will probably take me a while, however, when I get any one of them working I will post an example here in case it benefits anyone else.
 
Upvote 0

Hilton

Active Member
Licensed User
Longtime User
I see that rSoftwareSerial is not compatible with esp32 according to Errel in a recent post. That answers my question satisfactorily and will stop banging my head trying to resolve a non existent problem. We have decided to stick with the Arduino Mega with software serial for now as it performs satisfactorily. I will ignore other options for the moment.
 
Upvote 0
Top