Olimex Support Forum

Microcontrollers => ESP32 => Topic started by: danski on November 28, 2020, 10:26:14 pm

Title: I2C with ESP32-POE
Post by: danski on November 28, 2020, 10:26:14 pm
I'm using the ESP32-POE with ethernet, both for power and communication. I'm struggling a bit for free I/O pins, so taking the Olimex advice:

Quote from: LubOlimex on June 24, 2019, 11:24:16 amIf you need more GPIO pins consider either using additional GPIO expander board over I2C/SPI/UART

I bought an MCP23008. But I'm a bit confused which pins I should use it with. This chap (https://community.home-assistant.io/t/working-ethernet-thermometer-using-the-olimex-esp-poe-iso-board/175371) seems to have used the ESP32-POE-ISO with both ethernet and I2C, but when I look at the I2C pins, 16 seems to be used by both EMAC_CLK_OUT_180 and EMAC_RX_ER so I don't really understand how that's working successfully for him.

Guidance would be really appreciated, thank you!
Title: Re: I2C with ESP32-POE
Post by: LubOlimex on November 30, 2020, 09:48:01 am
Pins 13 and 16 are alright. Don't forget the GND. We have published examples of ESP32-POE with I2C modules at the Arduino software section here:

https://github.com/OLIMEX/ESP32-POE/tree/master/SOFTWARE/ARDUINO

MOD-BME280 uses I2C:

https://github.com/OLIMEX/ESP32-POE/blob/master/SOFTWARE/ARDUINO/ESP32_PoE_MOD_BME280/ESP32_PoE_MOD_BME280.ino

MOD-IO uses I2C:

https://github.com/OLIMEX/ESP32-POE/blob/master/SOFTWARE/ARDUINO/ESP32_PoE_WebServer_MOD_IO/ESP32_PoE_WebServer_MOD_IO.ino

there are few others there too.
Title: Re: I2C with ESP32-POE
Post by: danski on December 10, 2020, 04:52:55 pm
Quote from: LubOlimex on November 30, 2020, 09:48:01 amPins 13 and 16 are alright.

Thank you I'm confused how pin 16 is usable when it is used by both emac_clk_out_180 AND emac_rx_er? Just don't understand enough! :-)
Title: Re: I2C with ESP32-POE
Post by: LubOlimex on December 15, 2020, 09:57:38 am
I think you are confusing ESP32 pin #16 and GPIO #16 which is ESP32 pin #27.

The Arduino code doesn't care about ESP32 pin #; only about GPIO#.