Web Weather Forecast Display on ESP8266 and MicroPython

Using a D1 mini to download and show one-week weather forecast data on an LCD 20x4 display.

Sometime ago I’ve come across MetaWeather, a weather data service requires no authentication or registration. I figured I’ll make a little weather forecast display. (But is the weather service accurate though? Maybe just ok in my country. You can always check more accurate weather forecast on your phone, right?)

I used a WeMos D1 mini ESP8266/ESP-12 board with a much larger LCD 2004A 20x4 display module (with a LCM1602 I2C board on it). The core principle is basically the same as my ESp8266 Web Clock project.

This device would:

Connect to WiFi on startup and make query.
Display and cycle 6-day weather forecast data on LCD every 1.5 seconds.
If you want an update of the weather data, press button to reset device or unplug/replug it.
EDIT: Originally I wanted this device to update automatically every 1 hour or whenever user pressed the button. It turns out the D1 would ran out of memory (get MemoryError in the JSON parsing stage) after first successful query! So now you need to reset device to manually update the data.”

Link

Related Content