TMF8701 TOF Sensor with an ESP32-CAM board
![userHead](https://dfimg.dfrobot.com/dfPortrait2.png)
I'm trying to use a TMF8701 TOF sensor with an ESP32-CAM board. The camera uses the default I2C pins.
How would I modify the example Arduino sketch to use alternate pins for a second I2C channel? (SDA = Pin 33, SCL = Pin 32)
2023-02-20 14:19:29 ![](https://dfimg.dfrobot.com/nobody/makelog/702fc71edf2afa6fa308cce014161606.png)
![](https://dfimg.dfrobot.com/nobody/makelog/f0ce23a9b8b93db8db7b229a6331492a.png)
NeloKin
Hi
As the connection use Wire.h, you can enable the second I2C by this way.
![](https://dfimg.dfrobot.com/nobody/makelog/702fc71edf2afa6fa308cce014161606.png)
![](https://dfimg.dfrobot.com/nobody/makelog/f0ce23a9b8b93db8db7b229a6331492a.png)
However, you can connect these two sensors on the same I2C port, they will work together as they have different I2C addresses.
Hope it can help.
![userHeadPic](https://dfimg.dfrobot.com/dfPortrait2.png)