Beruflich Dokumente
Kultur Dokumente
#include <SPI.h>
#include <DMD3asis.h>
#include <font/KecNumber.h>
#include <font/BigNumber.h>
#include <font/Font4x6.h>
#include <font/SystemFont5x7.h>
#include <font/Font3x5.h>
#include <font2/Font6x7.h>
#include <DS3231.h>
#include <EEPROM.h>
#include <avr/pgmspace.h>
#include <Wire.h>
#include <MemoryFree.h>
#define BUZZ 2
DMD3 Disp(1,1);
int maxday[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
RTClib RTC;
DS3231 Clock;
//Structure of Variable
} struct_param;
typedef struct
uint8_t hD;
uint8_t hM;
uint16_t hY;
} hijir_date;
// Variable by Structure
struct_param Prm;
hijir_date nowH;
// Time Variable
DateTime now;
float floatnow = 0;
uint8_t daynow = 0;
uint8_t ty_puasa = 0;
uint8_t hd_puasa = 0;
uint8_t reset_x = 0;
//Other Variable
char CH_Prm[155];
boolean DoSwap;
int RunSel = 1; //
int RunFinish = 0 ;
//=======================================
//===SETUP===============================
//=======================================
void setup()
{ //init comunications
Wire.begin();
Serial.begin(9600);
updateTime();
GetPrm();
//SendPrm();
Disp_init();
//=======================================
//=======================================
void loop()
DoSwap = false ;
fType(1);
Disp.clear();
// Timer Function every 10 Minutes
Timer_Minute(1);
// =========================================
// =========================================
// =========================================
// =========================================
if(RunFinish==100 and jumat ) {RunSel = 103; RunFinish = 0; reset_x = 1;} //after Azzan Jumat (anim
100)
else if(RunFinish==100) {RunSel = 101; RunFinish =0;} //after Azzan Sholah (Iqomah)
if(RunFinish==101) {RunSel = 102; RunFinish =0; reset_x=1;} //after Iqomah(anim 101) set Message
Sholah (anim 102)
if(RunFinish==102) {RunSel = 104; RunFinish =0;} //after Message Sholah (anim 102) set Blink
Sholah(anim 104)
if(RunFinish==103) {RunSel = 104; RunFinish =0;} //after Messagw Jum'at (anim 103) set
Blink Sholah(anim 104)
// =========================================
// =========================================
// =========================================
// =========================================
void Disp_init()
{ Disp.setDoubleBuffer(true);
Timer1.initialize(2000);
Timer1.attachInterrupt(scan);
setBrightness(int(Prm.BL));
fType(1);
Disp.clear();
Disp.swapBuffers();
{ Timer1.pwm(9,bright);}
void scan()
{ Disp.refresh();}
// =========================================
// =========================================
void updateTime()
{ now = RTC.now();
if((Tmr-lsRn)>(repeat_time*60000))
lsRn =Tmr;
update_All_data();
Serial.print("freeMemory()=");Serial.println(freeMemory());
//SendPrm();
void update_All_data()
uint8_t date_cor = 0;
updateTime();
if(floatnow>sholatT[6]) {date_cor = 1;} // load Hijr Date + corection next day after Mhagrib
else {setBrightness(Prm.BL);}
void check_azzan()
SholatNow = -1;
{
if (i!=0 and i!=2 and i!=3) // bukan terbit dan bukan dhuha
SholatNow = i;
azzan =true;
RunSel = 100;