So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By fishparalyzer
#67700 So I have hit a huge stopping point trying to get an Adafruit Si7021 temp/hum sensor to work with an ESP8266 I bought off Amazon, a HiLetgo NodeMCU ESP-12E. It seems that all the documentation I found to use the Wire.h library to get esp8266 to use the sensor's I2C ports won't work right because Adafruit uses their own library for Si7021 instead of the generic library all the doc's point to.

So my question is this: Does it seem that if your going to use Adafruit sensors you should be using an Adafruit controller? I'm pretty new to Arduino and the like, maybe this is a known rule in the maker community? Any input would be great!
User avatar
By gbafamily1
#67738 NodeMCU boards are labelled with pin names like D0, D1, etc. which do not correspond to the GPIO number (that is, D0 is not GPIO0). Use the following diagram to connect the correct pins. I mix and match Adafruit and Sparkfun breakout boards with generic ESP8266 boards all the time.

Image
User avatar
By schufti
#67748 in any sketch where you find references to "pins" by plain numbers e.g. digitalRead(0) , used on esp8266 this means "gpio0". If you want to change it to the labels on nodemcu you could instead use digitalRead(D3).
So if you see sthg like wire.begin(2,0) this means that your i2c will be on gpios 2,0 or D3,D4 on your nodemcu (the first parameter being datapin the second clockpin).