I’m trying to setup xiao esp32s3 to work as slave on two separate i2c buses (one is raspberry pi that likes to be master) other is lilygo T-RGB (also like to be master for his own stuff)
First issue:
if I init wire like this Wire.begin(SLAVE_ADDRESS);
everything is fine, but if I try to specify address Wire.begin(SLAVE_ADDRESS,5,6);
it does not work … (or 4,5 … tried most permutations) … is it pin numbers or not possible?
Second
Can you make ESP32 to have 2 i2c slaves or not? … because I see that it can have two buses as master
are you using Arduino IDE? May be a pin naming thing… Physical Pin v/s Logical pin number… If you are not using the correct back setup the pin numbers will not be correctly defined. in alot of these libraries the pin numbers are not variables but defined
some places say you need special dedicated IIC cicuit in the processor for IIC… (in this case the XIAO has only one) others say you can choose the pins… others say you have to bit bang on other pins
I would say try using the UART port… Pins D6 and D7 but use the GPIO pin numbers 43 & 44 (as shown on the image… each device may be different)
You can use this device and the pins as discribed above and the top two grove ports are IIC 1 and set the bottom right UART port to be IIC 2 . The top two are hard wired to IIC the bottom left port is not able to be used that way… as it is only three wire