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

The WeatherStation Kit comes with an OLED display that has four connectors: VCC, GND, SCL and SDA. They have the following meaning:
  • 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.
In the following diagram I used a bread board and male-to-male jumpers to connect the components. But you can also connect them directly with four (coloured) female-to-female jumpers. They come with the WeatherStation Kit. Just peal the first four off of the bundle and connect them according to the picture. The colors do not matter

Please Note: there are versions with swapped GND and VCC pins. Be careful to connect them according to the printed labels, not this diagram

  • 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++

First Run

Now we’re all set to run the WeatherStation software for the first time. Click on the “Upload” arrow and wait until the compilation and the transfer have ended. Now you should see the OLED display lighting up and displaying a WiFi icon. It is trying now to acquire access to the wireless network you have defined earlier.
This is just the beginning. In the next chapter I will show you how to extend the weather station and display other information such as Stock Market information…
6 comments
  1. Squix amazing tutorial, very easy to follow. Would be really cool if you could extend it to display google calendar events or new emails from gmail.

  2. Well played sir. Based on what you have written I think I can give the ESP8266 a try with a fair chance to succeed.

  3. Hi Daniel,

    Wanted to inform you of an unfortunate "update" the manufacturer of SSD1306 made: they swaped GND and VCC!! I was not carefull enough in connecting the module, now it is probably dead, the NodeMCU is still alive though. look at my photo: https://goo.gl/photos/itaQvZFK9fvqBcEY6 and compare it to yours above!! I will buy another module and try again, all others steps went fine and I am eager to see the results, I am sure it will be great. Maybe you should consider update your instructions.

    • Hi Daniel,

      I swaped the cable and now in works, the module is not dead. I had to reinstall the IDE on a new computer, plus a couple of otherr father's things 😉 that's the only reason why it took so long.

      Thanks for this wonderfull Kit!!

Comments are closed.