Mini Weather Station

The goal of this project was to display the current weather details on a connected OLED display.

Hardware

The hardware for this project is simple:

Wiring the merely consists of connecting the display to the Mini D1 board, which is in turn powered by a simple USB-PSU:

  1. Vcc -> Vcc (3.3v)
  2. Group -> Ground
  3. SCK -> WeMos D1 D4
  4. SDA -> WeMos D1 D3

There hardest part of this project was getting an OLED library that would work with the Mini D1. The Adafruit library worked just fine, over I2C, on an arduino - but not on the mini-board.

Happily I stumbled across this esp8266-oled-ssd1306 library which worked just fine.

 

Software

The software for this project requires an API-key from the http://wunderground.com service, but otherwise works as the other projects on this site:

  • If connection details have been saved previously the device will connect to the local WiFi network.
  • If no connection-details are saved it will function as an access-point, allowing you to specify the appropriate WiFi network.
  • The device will fetch the date & time via NTP.
  • The device will fetch weather-details from Wunderground.com.
  • The screen will alternate between three displays:
    • The current date & time.
    • The current weather conditions.
    • A three-day forecast.
  • Over-the-air updates are enabled, to allow reprogramming without disconnection.

The full code can be found in my ESP8266 repository, in the d1-weather-station sub-directory.

Example Output