adafruit / Adafruit_Si7021

Arduino library for Adafruit Si7021
34 stars 28 forks source link

How to change the i2C pin? #28

Closed bkrajendra closed 1 year ago

bkrajendra commented 1 year ago

I am using ESP-12S and struggling with this library, as its not getting detected. I want to change the i2c pins as the default pins for the esp-12s board have different pins assigned.

caternuson commented 1 year ago

The Arduino Board Support Package for the board you are using needs to take care of configuring its Wire interfaces. A non-default Wire interface can then be passed in when creating the Si7021 instance: https://github.com/adafruit/Adafruit_Si7021/blob/08ed901e88b31ac0df0ccc2ce94a38f004967046/Adafruit_Si7021.h#L81