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
Switch branches/tags
Nothing to show
Clone or download
blotfi Update stoled.ino
corrected for better display and refresh of OLED display
Latest commit 2451190 Jan 10, 2018
Permalink
Failed to load latest commit information.
README.md Update README.md Jan 10, 2018
mainroutines.cpp Add files via upload Jan 10, 2018
mainroutines.h Add files via upload Jan 10, 2018
stoled.ino Update stoled.ino Jan 10, 2018

README.md

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

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. Check the schematic on https://create.arduino.cc/projecthub/blotfib/salat-time-679321

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