Page 1 of 1
ESP32 to ESP32 local communication
Posted: Thu Mar 05, 2020 7:31 pm
by Pcborges
Hi, I have a project where I need more GPIO pins than freely available on the ESP32 and would like to have a second ESP32 managing some sensors and, when requested, send sensor reading to the main ESP32 to be uploaded to the internet via GPRS (no Wifi available).
I would like to avoid using local WiFi or BlueTooth because the device will be powered by batteries.
I have been looking for examples of such ESP32 to ESP32 local communication but found none.
What is the best/fastest way to achieve that?
Assistance will be highly welcome.
Thanks in Advance.
Paulo
Re: ESP32 to ESP32 local communication
Posted: Mon Mar 09, 2020 1:34 am
by PeterR
Depends on your throughput/latency/aliasing needs.
Typically you have the console/programming serial port (2 pins) available, so would 250Kbps+ soft scheduling do?
If you use the programming link then you would have to disconnect one processor whilst programming the other (unless you do OTA).
Re: ESP32 to ESP32 local communication
Posted: Tue Mar 10, 2020 11:38 am
by username
If serial speeds will work for you then use serial port 1 on both ESP32's to talk to one another.
Re: ESP32 to ESP32 local communication
Posted: Tue Mar 10, 2020 1:02 pm
by OutOfLine
If you plan to use default pins I would rather try UART2 (default pins 16/17)
On the boards I use (or maybe for all boards?) the default pins for UART1 are in use for flash memory
I have not tested the speed you can get, but it might be higher than you think
Re: ESP32 to ESP32 local communication
Posted: Sun Mar 15, 2020 4:45 am
by warren
If it is just more GPIO pins that you need, input or output, use an I/O expander chip like the PCF8574, which communicates over I2C. Of course, this won't do if you need high I/O bandwidth, but serves well for low I/O GPIO ports. Put your high bandwidth GPIOs on the ESP32 and allocate low bw on the expander.
https://ecee.colorado.edu/~mcclurel/Phi ... 8574_4.pdf
These are cheap, effective, and simple to code for.
Re: ESP32 to ESP32 local communication
Posted: Thu Apr 09, 2020 1:01 am
by Pcborges
Hi, thanks all.
What I need is to connect a camera to a TTGO Call where most pins are already taken. relocating some functions may be a solution but I would prefer to have an ESP32-Cam sending captured pictures once every, say, 10 minutes. That would solve the problem.
Regards