[go: nahoru, domu]

Skip to content
/ ipadd Public

Custom information monitor for an ILI9341 TFT display driven by a MicroPython-configured Raspberry Pi Pico W

Notifications You must be signed in to change notification settings

m1younis/ipadd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ipadd

A personal introduction to embedded programming and microcontrollers, the inspiration for which stemmed from a combination of Pi-hole's PADD (hence the naming) and this recreation.

It serves as a real-time display centred around daily prayer times in addition to collecting a variety of data.

Note

IP and MAC addresses have been masked in the image above for demonstration purposes.

Features

  • The following information is based on your city (click here to learn more):
    • Prayer times fetched from two sources; the latter is utilised in cases where the first is unavailable, despite having reduced precision in comparison.
    • Weather statistics retrieved from OpenWeatherMap's extensive API.
  • Ambient temperature, humidity and pressure readings.
  • Connection configurations for your local network.

Note

Local weather, internal atmosphere and network meta is refreshed once every 5 minutes of each hour.

Hardware

Components list:

  • Raspberry Pi Pico W
  • ILI9341 320x240 2.2" TFT SPI display
  • BME280 sensor (Pimoroni's version was used, though it shouldn't matter)

The resulting circuit diagram is as follows:

GPIO pins 16, 17, 18 and 19 control the LCD via SPI (default) channel 0, whilst sensor communication is achieved over I2C (default) channel 0 by way of GPIO pins 4 and 5 as per the Pico's pinout.

Firmware

Assuming your board hasn't been flashed yet, follow this video tutorial to install Thonny IDE along with the binary file necessary for configuring MicroPython.

All source code for the libraries used is found within the lib directory - no additional dependencies are required.

Configuration

Ensure that env.json is present within the root directory of your Pico's filesystem prior to running main.py as it securely stores network credentials, city and country names. Its structure is outlined below:

{
    "SSID_NAME": "router_name",
    "SSID_KEY": "router_password",
    "CITY_NAME": "your_city",
    "COUNTRY_CODE": "two_letter_country_code",
    "APP_ID": "openweathermap_api_key"
}

Replace each placeholder with its corresponding case-sensitive value. APP_ID defines an OpenWeatherMap API key, which is generated upon registering an account here if you don't already have one.

Limitations

  • MicroPython's implementation of the urequests library is outdated and struggles to support HTTPS requests, resulting in issues accessing a more accurate and comprehensive prayer times API.
  • On-board storage constraints meant functioning Python libraries (namely requests and beautifulsoup4) couldn't be installed locally with their dependencies to synchronously resolve the issue above through web scraping.
  • The character set for fonts provided by the display driver library used were restricted, reducing visual appeal due to the range of available symbols.

About

Custom information monitor for an ILI9341 TFT display driven by a MicroPython-configured Raspberry Pi Pico W

Topics

Resources

Stars

Watchers

Forks