GithubHelp home page GithubHelp logo

m1younis / ipadd Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 74 KB

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

C 20.32% Python 79.68%
ili9341 microcontroller micropython prayer-times islamic python raspberry-pi

ipadd's Introduction

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.

ipadd's People

Contributors

m1younis avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.