Skip to content

WizFi360 Weather Station

This is a weather station using WizFi360. It receives weather data from public weather api services and display weather information.

briankdlee

Published October 31, 2022 · © GNU General Public License, version 3 or later (GPL3+)

WizFi360 Weather Station

Components

Hardware components
WizFi360-EVB-Pico

x 1


ILI9341 2.8" SPI TFT LCD Display Touch Panel 240X320 with PCB 5V/3.3V

x 1

SPI TFT LCD (Controller: ILI9341)

Software Apps and online services

Project description

WizFi360 Weather Station

Overview

This is weather station using WizFi360. It receive weather information from data.go.kr (see https://www.data.go.kr/data/15084084/openapi.do ) and display weather information to LCD display.

Running Video

 

Install

  1. Install CircuitPython from https://github.com/ronpang/WizFi360-cpy
  2. CircuitPy Drive will be created after installed CircuitPython.
  3. Extract Source code(WizFi360-weather-station.zip) to CircuitPy Drive.
  4. Extract Library(lib.zip) to CircuitPy Drive.

Config

  1. Edit WiFi SSID/Wifi Password in secrets_example.py file.
  2. Edit latitude, longitude in secrets_example.py file.
  3. Save as secrets_example.py to secrets.py

Run

  1. Install Thonny from https://thonny.org/
  2. Choose menu Tools -> Options...
  3. Click Interpreter Tab.
  4. Set Interpreter to "CircuitPython (generic)".
  5. Choose Port to connected serial port.
  6. Open weather_station.py file in WizFi360-weather-station.
  7. Run weather_station.py file.

Hardware environment

  1. WizFi360-EVB-Pico.
  2. LCD Display (ILI9341 3.2" SPI TFT): connected to WizFi360 SPI ports (http://www.lcdwiki.com/3.2inch_SPI_Module_ILI9341_SKU:MSP3218)

Software environment

  1. CurcuitPython https://github.com/ronpang/WizFi360-cpy
  2. Adafruit CircuitPython Bundle (https://github.com/adafruit/Adafruit_CircuitPython_Bundle)
  • adafruit_ili9341: CircuitPython ILI9341 LCD Display low level driver
  • displayio : various LCD support layer on CurcuitPython, supporting bitmap display (i.e. weather icon)
  • adafruit_bitmap_font: bitmap font library displaying on LCD

Weather data sources

This open api provide wheather information. 

You must get service key from https://data.go.kr/data/15084084/openapi.do before getting the weather data.

Originally, openweathermap(https://openweathermap.org/) was selected to receive weather infomation. but openweathermap does not HTTPS respond on using WizFi360 + CircuitPython environment. So, KMA service is used getting weather information. You can use another wheather api if you can convert weather information to KMA format.

Wiring

Wiz360-EVB-Pico is fully compatible to Raspberry Pi Pico. So, wiring is the same as Raspberry Pi Pico and ILI9341 SPI Display.

WizFi360 Weather Station

Conclusion

WizFi360 provides excellent environment running CircuitPython.  Wi-Fi, HTTP Communication, LCD control through SPI works well. It enables to make lightweight but powerful IoT Device. I hope enhanced version will be released continuously.

Documents

  • WizFi360 to LCD Display (ILI9341 3.2" SPI TFT) Wiring

    From WizFi360 to LCD Screen wiring

  • Application code (in CircuitPython)

    Application code to receive weather information and display to LCD Screen.

  • Adafruit CircuitPython Bundle

    Libraries depend on WeatherStation application. It contains only libraries to need running application.

Comments

Comments