Hi.
A project I’m working on needs low-ping, high-bandwidth, high-reliability communication to and from the computer. I’ve been using Serial.print() over USB, but I’ve had problems with garbage in the feed (mostly a non-issue, since I run a regex pattern match on the computer) and devices intermittently disconnecting (a bigger problem).
I’m controlling robotics, so I’d like it to be as real-time as possible, and I’m communicating with multiple ESP32’s from the PC, so whatever method I use would have to support that. I have a Raspberry Pi I could use, in case it would be best to use its GPIO pins, though I’d rather avoid that.
Thank you!
Hi
low-ping, high-bandwidth use a separate router for robotics, rather than your home wifi router
I use use wifi and Bluetooth to talk to esp32 from a PC
Bluetooth: https://rntlab.com/question/esp32-bluetooth-c/
Wifi:
- https://randomnerdtutorials.com/esp32-web-server-arduino-ide/
- https://randomnerdtutorials.com/esp32-dht11-dht22-temperature-humidity-web-server-arduino-ide/
I can use theses methods for Home Automation and controlling a wifi car around the home
I think wifi or LoRa (7 miles about) is the best way to control your robots using a mutithread http server/client
you can use http://www.wampserver.com/en/download-wampserver-64bits/
and send your commands by WebClient for both internet and LAN
Hope it Helps
derek
Hi Dusty.
I apologize for taking so long to get back to you, but somehow I’ve missed your question.
If you want to use a wired connection, Serial communication is the best option. However, as you said, sometimes it will output some garbage.
You’ll probably need to create some if statements to remove garbage data.
For a reliable and simultaneous connection, MQTT is probably the best option (but it is low-bandwidth). However, it is very reliable and it works with simultaneous connections from multiple devices.
You can also follow Derek’s suggestions and then tell us if they work.
Regards,
Sara
Hi Sara,
Thank you for the suggestion! I’m just now getting back to working on this project. I hope that MQTT will work for it – it’s really nice to work with, and your tutorials on it made it very easy to get started. I’m really grateful for your work.
I’ll try and remember to update once I get something working.
Kind regards,
Dusty