-->
Page 2 of 2

Re: ESP32 Wire I2C

PostPosted: Tue Jul 17, 2018 3:49 pm
by btidey
The code examples I see create an instance of the TwoWire class. First you choose which of the 2 I2c interfaces you want, then you define the pins. https://github.com/espressif/arduino-esp32/issues/977

Re: ESP32 Wire I2C

PostPosted: Wed Jul 18, 2018 2:07 am
by heatherrosado
nice post

Re: ESP32 Wire I2C

PostPosted: Wed Jul 18, 2018 8:14 am
by picstart
First,
Thanks for the response.I note that the example in the above post either purposefully or by coincidence just happens to use the only hardwired I2c pins. I used Wire() with the esp8266 and I know I should never have expectations but I thought it just might be portable to the esp32. Well it almost did work except that the pins must be the hardware pins.
Since I only use 8266 and 32's all of the attempts to make the code independent of hardware which has value for vendors in that they can pitch new hardware to an existing customer are often just annoying. Since it when it doesn't work the hardware issue is buried deep. The annoyance is muted since it is free code and often is faster to fix than write from scratch. Further it can be fixed with a soldering iron some thing I can't do with laptop or PC code.
I'm hoping for a move to strip esp Arduino all non esp boards and all libraries for non esp boards. The " code runs on everything" seems like a fairy tale.
I'll see in the next few days if the hardwired I2c can be multiplexed to other pins.