Code Monkey home page Code Monkey logo

salah-timmings's Introduction

linting: pylint Code style: black Ruff

Salah-Timmings

Display Salah Timmings on small display, running on Raspberry Pi.

SSD1306 showing current time and next day's Fajar time. SSD1306 showing current and next Salah's time.

In Progress.

  • Make a logic to return Isha ending time (i.e. Fajir start time of next day).
  • Simulate a month ending and observe behavior. I reckon some errors may occur at the end of the month.
  • Confirm and correct the timmings.
  • 3rd info to show: Remaining time to next Salah.
  • Add a physical momentary button to display for 5 seconds then turn off the display (to avoid burn-in).

Pinouts and connections:

I have a SSD1306 display with 4 pins:

  1. VCC
  2. GND
  3. SDA
  4. SCL

VCC -> 3V3

GND -> GND

SDA -> SDA

SCL -> SCL

Check Adafruit's website for other displays' connections.

Setup:

  1. Load Raspberry Pi OS on your RPi.
  2. Enter command and enable I2C or SPI from Interface options as needed:
sudo raspi-config
  1. Get XLSX timming files for your location and save them in XLSX folder.
  2. Run xl2shelve.py to convert XLSX files to readable objects.

Important

You could get into errors if you blindly run the scripts. Read the script then modify.

  1. Change index of Salahs w.r.t. to indexes of XLSX file (if needed).
  2. Change main.py file as needed for your display then run:
sudo python main.py

Important

If you are getting shelve library error, try upgrading to newer Python version. I have tried on 3.11.3 & 3.11.4. You can try this website for alternate install of Python:

Autostart with systemd:

  1. Modify the user and ExecStart (and other if needed) in salah_timings.service file.
  2. Copy this file to /etc/systemd/system/
  3. Enable the service to let it start on boot.
sudo systemctl enable salah_timmings.service

Conclusion:

Unfortunately, My SSD1306 display is broken. i2cdetect is not detecting it so, I cannot work on this project further.

I have bought a new OLED SSD1306 display and successfully completed the project.

salah-timmings's People

Contributors

sarimbinwaseem avatar

Stargazers

 avatar

Watchers

 avatar  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.