This chapter assumes, that you have been successfully working through the previous two chapters (IDE Setup, Adapting Code). In this step we’re going to connect the display and start the weather station for the first time.
Connect the OLED display with the NodeMCU
- VCC and GND are the power supply of the display. VCC is the positive supply voltage and GND stands for “ground”. They will be connected to 3V3 and GND on the NodeMCU board
- SCL and SDA are the data lines of the I2C protocol. SCL stands for Serial Clock and SDA for Serial Data.
- VCC to 3V3
- GND to GND
- SDA to D3
- SCL to D4
There is a little confusion about the pin names. The Arduino IDE uses the GPIO number given by the chip. The NodeMCU team who designed the board changed the pin naming for their LUA firmware. Because of this you have now hardware labeled with one naming scheme and software that uses a different one. Use the following table to map between the two:
|The IO index is the naming on the board, whereas the “ESP8266 pin” column
is the one you use in the Arduino IDE code. E.g. D5 on the board is pin 14 in C/C++
A ridiculous amount of coffee was consumed in the process of building this project. Add some fuel if you'd like to keep me going!