ESP32 to ESP32 local communication

Pcborges
Posts: 37
Joined: Thu Aug 09, 2018 9:56 pm

ESP32 to ESP32 local communication

Postby Pcborges » Thu Mar 05, 2020 7:31 pm

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

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: ESP32 to ESP32 local communication

Postby PeterR » Mon Mar 09, 2020 1:34 am

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).
& I also believe that IDF CAN should be fixed.

username
Posts: 477
Joined: Thu May 03, 2018 1:18 pm

Re: ESP32 to ESP32 local communication

Postby username » Tue Mar 10, 2020 11:38 am

If serial speeds will work for you then use serial port 1 on both ESP32's to talk to one another.

OutOfLine
Posts: 52
Joined: Sat Feb 24, 2018 1:32 pm

Re: ESP32 to ESP32 local communication

Postby OutOfLine » Tue Mar 10, 2020 1:02 pm

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

warren
Posts: 15
Joined: Thu May 02, 2019 3:16 pm

Re: ESP32 to ESP32 local communication

Postby warren » Sun Mar 15, 2020 4:45 am

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.

Pcborges
Posts: 37
Joined: Thu Aug 09, 2018 9:56 pm

Re: ESP32 to ESP32 local communication

Postby Pcborges » Thu Apr 09, 2020 1:01 am

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

Who is online

Users browsing this forum: Phillip and 80 guests