Salat Time

Salat Time © CC BY

An Arduino code that displays on a small 0.98" OLED SSD1306 Date/Time and also calculates and displays Salat Time for a given town

  • 3,228 views
  • 5 comments
  • 15 respects

Components and supplies

About this project

SalatTime-Arduino-oled

An Arduino code that displays on a small 0.98" OLED SSD1306 Date/Time and also calculates and displays Salat Time for a given town

The animation at the end will give the different time as following:

1. Building the circuit

You need

1 Arduino Nano but any Arduino can be used.

1 RTC DS1307 or DS3231 (more precise)

1 I2C OLED display

I used a small 0.98" OLED with I2C interface SSD1106 that is supported by the excellent library U8g2

That's all

Here is the schematic

2. The program

The code is shared on github:

https://github.com/blotfi/SalatTime-Arduino-oled

This code has math routines to compute sun position and muslims salat (prayer) time for a given town (latitude / longitude), DST and convention. The hardware part is composed of an Arduino Nano, a RTC DS1307 and the SSD1306 OLED display to display the time, the date and prayer times.

More info

Here is the part of code you have to adapt to change for your town:

in mainroutines.cpp

/** change your town */
	const char CountryName[] PROGMEM = "Algeria";
	const char TownName[] PROGMEM = "Tlemcen";
	const double latitude = 34.88*deg2rd;
	const double longitude = -1.31*deg2rd;
	const int TimeZoneTown = 	1;
	const int Convention = 1;
	const int DST = 0;

in stoled.ino

//rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));

uncomment to force the RTC to take the compilation date and time

Code

Github
Install U82glib, RTClib and Streaming libraries in your Arduino IDE

Schematics

schematics
stoled_ghGUCeB4yN.fzz

Comments

Similar projects you might like

LCD with DS3231 Real Time Clock Module

Project showcase by Tan See Youu

  • 39,577 views
  • 0 comments
  • 30 respects

Clock Set Date Time

Project tutorial by Tittiamo

  • 34,598 views
  • 30 comments
  • 43 respects

Stopwatch and Lap Time Counter

Project showcase by LAGSILVA

  • 13,884 views
  • 5 comments
  • 24 respects

Arduino Temp. Monitor And Real Time Clock With 3.2" Display

Project tutorial by Nick Koumaris

  • 7,282 views
  • 4 comments
  • 13 respects

LED Ring Real Time Clock

Project showcase by 3 developers

  • 1,039 views
  • 0 comments
  • 1 respect

Lapsed Time Timer

Project showcase by Bobby

  • 770 views
  • 1 comment
  • 1 respect
Add projectSign up / Login