├── NodeMCU ├── JadwalSholat-P10-1Panel │ ├── bin │ │ ├── Readme.txt │ │ └── nodemcu-jws-p10-HJS589-1000masjid-r3-0.ino.nodemcu.bin │ ├── libraries │ │ └── HJS589 │ │ │ ├── fonts │ │ │ ├── ElektronMartArabic5x6.h │ │ │ ├── ElektronMart6x16.h │ │ │ ├── ElektronMartArabic6x16.h │ │ │ └── ElektronMart5x6.h │ │ │ ├── HJS589.h │ │ │ └── Bitmap.h │ ├── Readme.md │ └── PrayerTimes.h ├── ESP8266 Flasher.iso ├── JadwalSholat-P10-2Panel │ ├── JadwalSholat-P10-2Panel.ino.nodemcu.bin │ ├── libraries │ │ └── HJS589 │ │ │ ├── fonts │ │ │ ├── ElektronMartArabic5x6.h │ │ │ ├── ElektronMart6x16.h │ │ │ ├── ElektronMartArabic6x16.h │ │ │ └── ElektronMart5x6.h │ │ │ ├── HJS589.h │ │ │ └── Bitmap.h │ ├── Readme.md │ └── PrayerTimes.h ├── JWSMurottal │ └── Readme.md ├── JadwalSholat-MAX7219 │ ├── README.md │ └── PrayerTimes.h ├── P4P5RGB-ESP32-HUB75DMA.ino └── P10SC-ESP32-RTC.ino ├── benderaindonesia.gif ├── MembuatJWS ├── MembuatJWS-18 │ ├── FSConfig.h │ ├── Display.h │ ├── Buzzer.h │ ├── WebServer.h │ ├── WebPage.h │ └── MembuatJWS-18.ino ├── MembuatJWS-19 │ ├── Display.h │ ├── FSConfig.h │ ├── Buzzer.h │ ├── WebServer.h │ ├── WebPage.h │ └── MembuatJWS-19.ino ├── MembuatJWS-20 │ ├── Display.h │ ├── FSConfig.h │ ├── Buzzer.h │ ├── WebServer.h │ ├── WebPage.h │ └── MembuatJWS-20.ino ├── MembuatJWS-21 │ ├── Display.h │ ├── FSConfig.h │ ├── Buzzer.h │ ├── WebServer.h │ ├── WebPage.h │ └── MembuatJWS-21.ino ├── MembuatJWS-22 │ ├── Display.h │ ├── FSConfig.h │ ├── Buzzer.h │ ├── WebServer.h │ └── WebPage.h ├── MembuatJWS-23 │ ├── Display.h │ ├── data │ │ └── configjws.json │ ├── Buzzer.h │ ├── WebServer.h │ ├── WebPage.h │ └── RTC.h ├── MembuatJWS-24 │ ├── Display.h │ ├── data │ │ └── configjws.json │ ├── Buzzer.h │ ├── WebServer.h │ └── RTC.h ├── MembuatJWS-17 │ ├── Display.h │ ├── Buzzer.h │ ├── WebServer.h │ ├── FSConfig.h │ ├── RTC.h │ └── WebPage.h ├── README.md ├── MembuatJWS-01 │ └── MembuatJWS-01.ino ├── MembuatJWS-15 │ └── WebPage.h └── MembuatJWS-16 │ └── WebPage.h ├── Oprekan ├── 7Segment8Digit74HC595.ino └── Joystick.ino ├── ArduinoNano └── JadwalSholat-P10-1Panel │ ├── Readme.md │ ├── fonts │ ├── angka6x13.h │ ├── Font3x5.h │ └── SystemFont5x7.h │ └── PrayerTimes.h └── README.md /NodeMCU/JadwalSholat-P10-1Panel/bin/Readme.txt: -------------------------------------------------------------------------------- 1 | Direktori tempat menyimpan bin files 2 | -------------------------------------------------------------------------------- /benderaindonesia.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/busel7/Arduino/HEAD/benderaindonesia.gif -------------------------------------------------------------------------------- /NodeMCU/ESP8266 Flasher.iso: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/busel7/Arduino/HEAD/NodeMCU/ESP8266 Flasher.iso -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-18/FSConfig.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | int detikiqmh; 5 | int menitiqmh; 6 | 7 | uint8_t tmputama; 8 | uint8_t tmpjws; 9 | uint8_t tmpinfo; 10 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-2Panel/JadwalSholat-P10-2Panel.ino.nodemcu.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/busel7/Arduino/HEAD/NodeMCU/JadwalSholat-P10-2Panel/JadwalSholat-P10-2Panel.ino.nodemcu.bin -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-1Panel/bin/nodemcu-jws-p10-HJS589-1000masjid-r3-0.ino.nodemcu.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/busel7/Arduino/HEAD/NodeMCU/JadwalSholat-P10-1Panel/bin/nodemcu-jws-p10-HJS589-1000masjid-r3-0.ino.nodemcu.bin -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-18/Display.h: -------------------------------------------------------------------------------- 1 | //---------------------------- 2 | // SETUP DMD HJS589 3 | 4 | #define DISPLAYS_WIDE 2 5 | #define DISPLAYS_HIGH 1 6 | DMDESP Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); // Jumlah Panel P10 yang digunakan (KOLOM,BARIS) 7 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-19/Display.h: -------------------------------------------------------------------------------- 1 | //---------------------------- 2 | // SETUP DMD HJS589 3 | 4 | #define DISPLAYS_WIDE 2 5 | #define DISPLAYS_HIGH 1 6 | DMDESP Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); // Jumlah Panel P10 yang digunakan (KOLOM,BARIS) 7 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-20/Display.h: -------------------------------------------------------------------------------- 1 | //---------------------------- 2 | // SETUP DMD HJS589 3 | 4 | #define DISPLAYS_WIDE 2 5 | #define DISPLAYS_HIGH 1 6 | DMDESP Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); // Jumlah Panel P10 yang digunakan (KOLOM,BARIS) 7 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-21/Display.h: -------------------------------------------------------------------------------- 1 | //---------------------------- 2 | // SETUP DMD HJS589 3 | 4 | #define DISPLAYS_WIDE 2 5 | #define DISPLAYS_HIGH 1 6 | DMDESP Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); // Jumlah Panel P10 yang digunakan (KOLOM,BARIS) 7 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-22/Display.h: -------------------------------------------------------------------------------- 1 | //---------------------------- 2 | // SETUP DMD HJS589 3 | 4 | #define DISPLAYS_WIDE 2 5 | #define DISPLAYS_HIGH 1 6 | DMDESP Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); // Jumlah Panel P10 yang digunakan (KOLOM,BARIS) 7 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-23/Display.h: -------------------------------------------------------------------------------- 1 | //---------------------------- 2 | // SETUP DMD HJS589 3 | 4 | #define DISPLAYS_WIDE 2 5 | #define DISPLAYS_HIGH 1 6 | DMDESP Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); // Jumlah Panel P10 yang digunakan (KOLOM,BARIS) 7 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-24/Display.h: -------------------------------------------------------------------------------- 1 | //---------------------------- 2 | // SETUP DMD HJS589 3 | 4 | #define DISPLAYS_WIDE 2 5 | #define DISPLAYS_HIGH 1 6 | DMDESP Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); // Jumlah Panel P10 yang digunakan (KOLOM,BARIS) 7 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-23/data/configjws.json: -------------------------------------------------------------------------------- 1 | { 2 | "iqmhs":"12", 3 | "iqmhd":"8", 4 | "iqmha":"6", 5 | "iqmhm":"5", 6 | "iqmhi":"5", 7 | "durasiadzan":"4", 8 | "ihti":"2", 9 | "latitude":"-6.16", 10 | "longitude":"106.61", 11 | "zonawaktu":"7", 12 | "hilal":"0", 13 | "namamasjid":"UNTUK 1000 MASJID - ELEKTRONMART.COM - 2021" 14 | } 15 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-24/data/configjws.json: -------------------------------------------------------------------------------- 1 | { 2 | "iqmhs":"12", 3 | "iqmhd":"8", 4 | "iqmha":"6", 5 | "iqmhm":"5", 6 | "iqmhi":"5", 7 | "durasiadzan":"4", 8 | "ihti":"2", 9 | "latitude":"-6.16", 10 | "longitude":"106.61", 11 | "zonawaktu":"7", 12 | "hilal":"0", 13 | "namamasjid":"UNTUK 1000 MASJID - ELEKTRONMART.COM - 2021" 14 | } 15 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-19/FSConfig.h: -------------------------------------------------------------------------------- 1 | // ---------------------- 2 | // FS CONFIG 3 | 4 | int detikiqmh; 5 | int menitiqmh; 6 | 7 | uint8_t iqmhs = 1; // menit 8 | uint8_t iqmhd = 1; // menit 9 | uint8_t iqmha = 1; // menit 10 | uint8_t iqmhm = 1; // menit 11 | uint8_t iqmhi = 1; // menit 12 | 13 | uint8_t durasiadzan = 1; // Menit 14 | uint8_t tipealarm; 15 | 16 | uint8_t tmputama; 17 | uint8_t tmpjws; 18 | uint8_t tmpinfo; 19 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-20/FSConfig.h: -------------------------------------------------------------------------------- 1 | // ---------------------- 2 | // FS CONFIG 3 | 4 | int detikiqmh; 5 | int menitiqmh; 6 | 7 | uint8_t iqmhs = 1; // menit 8 | uint8_t iqmhd = 1; // menit 9 | uint8_t iqmha = 1; // menit 10 | uint8_t iqmhm = 1; // menit 11 | uint8_t iqmhi = 1; // menit 12 | 13 | uint8_t durasiadzan = 1; // Menit 14 | uint8_t tipealarm; 15 | 16 | uint8_t tmputama; 17 | uint8_t tmpjws; 18 | uint8_t tmpinfo; 19 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-21/FSConfig.h: -------------------------------------------------------------------------------- 1 | // ---------------------- 2 | // FS CONFIG 3 | 4 | int detikiqmh; 5 | int menitiqmh; 6 | 7 | uint8_t iqmhs = 1; // menit 8 | uint8_t iqmhd = 1; // menit 9 | uint8_t iqmha = 1; // menit 10 | uint8_t iqmhm = 1; // menit 11 | uint8_t iqmhi = 1; // menit 12 | 13 | uint8_t durasiadzan = 1; // Menit 14 | uint8_t tipealarm; 15 | 16 | uint8_t tmputama; 17 | uint8_t tmpjws; 18 | uint8_t tmpinfo; 19 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-22/FSConfig.h: -------------------------------------------------------------------------------- 1 | // ---------------------- 2 | // FS CONFIG 3 | 4 | int detikiqmh; 5 | int menitiqmh; 6 | 7 | uint8_t iqmhs = 1; // menit 8 | uint8_t iqmhd = 1; // menit 9 | uint8_t iqmha = 1; // menit 10 | uint8_t iqmhm = 1; // menit 11 | uint8_t iqmhi = 1; // menit 12 | 13 | uint8_t durasiadzan = 1; // Menit 14 | uint8_t tipealarm; 15 | 16 | uint8_t tmputama; 17 | uint8_t tmpjws; 18 | uint8_t tmpinfo; 19 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-17/Display.h: -------------------------------------------------------------------------------- 1 | //---------------------------- 2 | // SETUP DMD HJS589 3 | 4 | #define DISPLAYS_WIDE 2 5 | #define DISPLAYS_HIGH 1 6 | HJS589 Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); // Jumlah Panel P10 yang digunakan (KOLOM,BARIS) 7 | 8 | 9 | 10 | //---------------------------------------------------------------------- 11 | // HJS589 P10 FUNGSI TAMBAHAN UNTUK NODEMCU ESP8266 12 | 13 | void ICACHE_RAM_ATTR refresh() { 14 | 15 | Disp.refresh(); 16 | timer0_write(ESP.getCycleCount() + 80000); 17 | 18 | } 19 | 20 | void Disp_init() { 21 | 22 | Disp.start(); 23 | noInterrupts(); 24 | timer0_isr_init(); 25 | timer0_attachInterrupt(refresh); 26 | interrupts(); 27 | Disp.clear(); 28 | 29 | } 30 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-17/Buzzer.h: -------------------------------------------------------------------------------- 1 | // BUZZER 2 | const int buzzer = 3; // Pin GPIO Buzzer - RX 3 | 4 | //---------------------------------------------------------------------- 5 | // BUNYIKAN BEEP BUZZER 6 | 7 | void BuzzerPanjang() { 8 | 9 | digitalWrite(buzzer, HIGH); 10 | delay(1000); 11 | digitalWrite(buzzer, LOW); 12 | delay(1000); 13 | digitalWrite(buzzer, HIGH); 14 | delay(1000); 15 | digitalWrite(buzzer, LOW); 16 | delay(3000); 17 | 18 | } 19 | 20 | void BuzzerPendek() { 21 | 22 | digitalWrite(buzzer, HIGH); 23 | delay(200); 24 | digitalWrite(buzzer, LOW); 25 | delay(100); 26 | digitalWrite(buzzer, HIGH); 27 | delay(200); 28 | digitalWrite(buzzer, LOW); 29 | delay(3000); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-18/Buzzer.h: -------------------------------------------------------------------------------- 1 | // BUZZER 2 | const int buzzer = 3; // Pin GPIO Buzzer - RX 3 | 4 | //---------------------------------------------------------------------- 5 | // BUNYIKAN BEEP BUZZER 6 | 7 | void BuzzerPanjang() { 8 | 9 | digitalWrite(buzzer, HIGH); 10 | delay(1000); 11 | digitalWrite(buzzer, LOW); 12 | delay(1000); 13 | digitalWrite(buzzer, HIGH); 14 | delay(1000); 15 | digitalWrite(buzzer, LOW); 16 | delay(3000); 17 | 18 | } 19 | 20 | void BuzzerPendek() { 21 | 22 | digitalWrite(buzzer, HIGH); 23 | delay(200); 24 | digitalWrite(buzzer, LOW); 25 | delay(100); 26 | digitalWrite(buzzer, HIGH); 27 | delay(200); 28 | digitalWrite(buzzer, LOW); 29 | delay(3000); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /NodeMCU/JWSMurottal/Readme.md: -------------------------------------------------------------------------------- 1 | Mohon maaf, dengan berat hati, karena terjadi BANYAK PENYALAH GUNAAN oleh pihak-pihak yang tidak bertanggung jawab, saat ini FIRMWARE JWS MUROTTAL kami tarik dari repository public dan pindah ke google drive dengan mengisi form berikut https://forms.gle/kQEnmgrpQR5WdZBh8 link untuk download firmware akan segera kami kirim melalui email terdaftar setelah data terverifikasi. 2 | 3 | Untuk mengantisipasi penyalah gunaan, kami hanya mendistribusikannya dalam bentuk Hardware NodeMCU ESP8266 yang telah kami proteksi yang bisa didapatkan di marketplace berikut: 4 | 5 | - Tokopedia : https://tokopedia.link/wIYpmTrv8ob 6 | - Shopee : https://shopee.co.id/PCB-Controller-Jam-Sholat-JWS-NodeMCU-Board-2.0-ElektronMart-LED-P10-Arduino-i.139057740.7134254234 7 | - Bukalapak : https://www.bukalapak.com/p/elektronik/komponen-elektronik/2aiovn2-jual-pcb-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 8 | 9 | Perbedaan NodeMCU yang sudah terisi JWS Murottal Quad dengan JWS Murottal DIY 10 | 11 | - JWS DIY hanya untuk penggunaan secara pribadi dan keperluan sosial. 12 | - JWS Quad firmware terbaru yang rutin kami update dan publish reviewnya di yutube kami, dengan fitur yang lebih lengkap dan kompatibilitas yang lebih banyak dengan chip DFPlayer. 13 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-19/Buzzer.h: -------------------------------------------------------------------------------- 1 | // BUZZER 2 | const int buzzer = 3; // Pin GPIO Buzzer - RX 3 | 4 | 5 | 6 | //---------------------------------------------------------------------- 7 | // BUNYI BEEP BUZZER 8 | 9 | int detikbeep; 10 | 11 | void BunyiBeep(uint8_t tipebeep, uint8_t durasibeep) { 12 | 13 | static uint32_t pMBuzT; 14 | static uint32_t pMBuzB; 15 | static boolean beep; 16 | static uint8_t dt; 17 | 18 | if (millis() - pMBuzB >= 1000) { 19 | detikbeep++; 20 | pMBuzB = millis(); 21 | } 22 | 23 | if (detikbeep < durasibeep) { 24 | tipebeep = tipebeep; 25 | } else { 26 | tipebeep = 0; 27 | durasibeep = 0; 28 | //db = 0; 29 | } 30 | 31 | if (tipebeep == 0) { 32 | digitalWrite(buzzer, LOW); 33 | } 34 | 35 | if (tipebeep == 1) { 36 | if (millis() - pMBuzT >= 500) { 37 | dt++; 38 | beep = !beep; 39 | pMBuzT = millis(); 40 | } 41 | 42 | if (dt == 6) { 43 | dt = 0; 44 | tipebeep = 0; 45 | } 46 | 47 | if (beep) { 48 | digitalWrite(buzzer, HIGH); 49 | } else { 50 | digitalWrite(buzzer, LOW); 51 | } 52 | } 53 | 54 | if (tipebeep == 2) { 55 | if (millis() - pMBuzT >= 1000) { 56 | dt++; 57 | beep = !beep; 58 | pMBuzT = millis(); 59 | } 60 | 61 | if (dt == 6) { 62 | dt = 0; 63 | tipebeep = 0; 64 | } 65 | 66 | if (beep) { 67 | digitalWrite(buzzer, HIGH); 68 | } else { 69 | digitalWrite(buzzer, LOW); 70 | } 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-20/Buzzer.h: -------------------------------------------------------------------------------- 1 | // BUZZER 2 | const int buzzer = 3; // Pin GPIO Buzzer - RX 3 | 4 | 5 | 6 | //---------------------------------------------------------------------- 7 | // BUNYI BEEP BUZZER 8 | 9 | int detikbeep; 10 | 11 | void BunyiBeep(uint8_t tipebeep, uint8_t durasibeep) { 12 | 13 | static uint32_t pMBuzT; 14 | static uint32_t pMBuzB; 15 | static boolean beep; 16 | static uint8_t dt; 17 | 18 | if (millis() - pMBuzB >= 1000) { 19 | detikbeep++; 20 | pMBuzB = millis(); 21 | } 22 | 23 | if (detikbeep < durasibeep) { 24 | tipebeep = tipebeep; 25 | } else { 26 | tipebeep = 0; 27 | durasibeep = 0; 28 | //db = 0; 29 | } 30 | 31 | if (tipebeep == 0) { 32 | digitalWrite(buzzer, LOW); 33 | } 34 | 35 | if (tipebeep == 1) { 36 | if (millis() - pMBuzT >= 500) { 37 | dt++; 38 | beep = !beep; 39 | pMBuzT = millis(); 40 | } 41 | 42 | if (dt == 6) { 43 | dt = 0; 44 | tipebeep = 0; 45 | } 46 | 47 | if (beep) { 48 | digitalWrite(buzzer, HIGH); 49 | } else { 50 | digitalWrite(buzzer, LOW); 51 | } 52 | } 53 | 54 | if (tipebeep == 2) { 55 | if (millis() - pMBuzT >= 1000) { 56 | dt++; 57 | beep = !beep; 58 | pMBuzT = millis(); 59 | } 60 | 61 | if (dt == 6) { 62 | dt = 0; 63 | tipebeep = 0; 64 | } 65 | 66 | if (beep) { 67 | digitalWrite(buzzer, HIGH); 68 | } else { 69 | digitalWrite(buzzer, LOW); 70 | } 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-21/Buzzer.h: -------------------------------------------------------------------------------- 1 | // BUZZER 2 | const int buzzer = 3; // Pin GPIO Buzzer - RX 3 | 4 | 5 | 6 | //---------------------------------------------------------------------- 7 | // BUNYI BEEP BUZZER 8 | 9 | int detikbeep; 10 | 11 | void BunyiBeep(uint8_t tipebeep, uint8_t durasibeep) { 12 | 13 | static uint32_t pMBuzT; 14 | static uint32_t pMBuzB; 15 | static boolean beep; 16 | static uint8_t dt; 17 | 18 | if (millis() - pMBuzB >= 1000) { 19 | detikbeep++; 20 | pMBuzB = millis(); 21 | } 22 | 23 | if (detikbeep < durasibeep) { 24 | tipebeep = tipebeep; 25 | } else { 26 | tipebeep = 0; 27 | durasibeep = 0; 28 | //db = 0; 29 | } 30 | 31 | if (tipebeep == 0) { 32 | digitalWrite(buzzer, LOW); 33 | } 34 | 35 | if (tipebeep == 1) { 36 | if (millis() - pMBuzT >= 500) { 37 | dt++; 38 | beep = !beep; 39 | pMBuzT = millis(); 40 | } 41 | 42 | if (dt == 6) { 43 | dt = 0; 44 | tipebeep = 0; 45 | } 46 | 47 | if (beep) { 48 | digitalWrite(buzzer, HIGH); 49 | } else { 50 | digitalWrite(buzzer, LOW); 51 | } 52 | } 53 | 54 | if (tipebeep == 2) { 55 | if (millis() - pMBuzT >= 1000) { 56 | dt++; 57 | beep = !beep; 58 | pMBuzT = millis(); 59 | } 60 | 61 | if (dt == 6) { 62 | dt = 0; 63 | tipebeep = 0; 64 | } 65 | 66 | if (beep) { 67 | digitalWrite(buzzer, HIGH); 68 | } else { 69 | digitalWrite(buzzer, LOW); 70 | } 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-22/Buzzer.h: -------------------------------------------------------------------------------- 1 | // BUZZER 2 | const int buzzer = 3; // Pin GPIO Buzzer - RX 3 | 4 | 5 | 6 | //---------------------------------------------------------------------- 7 | // BUNYI BEEP BUZZER 8 | 9 | int detikbeep; 10 | 11 | void BunyiBeep(uint8_t tipebeep, uint8_t durasibeep) { 12 | 13 | static uint32_t pMBuzT; 14 | static uint32_t pMBuzB; 15 | static boolean beep; 16 | static uint8_t dt; 17 | 18 | if (millis() - pMBuzB >= 1000) { 19 | detikbeep++; 20 | pMBuzB = millis(); 21 | } 22 | 23 | if (detikbeep < durasibeep) { 24 | tipebeep = tipebeep; 25 | } else { 26 | tipebeep = 0; 27 | durasibeep = 0; 28 | //db = 0; 29 | } 30 | 31 | if (tipebeep == 0) { 32 | digitalWrite(buzzer, LOW); 33 | } 34 | 35 | if (tipebeep == 1) { 36 | if (millis() - pMBuzT >= 500) { 37 | dt++; 38 | beep = !beep; 39 | pMBuzT = millis(); 40 | } 41 | 42 | if (dt == 6) { 43 | dt = 0; 44 | tipebeep = 0; 45 | } 46 | 47 | if (beep) { 48 | digitalWrite(buzzer, HIGH); 49 | } else { 50 | digitalWrite(buzzer, LOW); 51 | } 52 | } 53 | 54 | if (tipebeep == 2) { 55 | if (millis() - pMBuzT >= 1000) { 56 | dt++; 57 | beep = !beep; 58 | pMBuzT = millis(); 59 | } 60 | 61 | if (dt == 6) { 62 | dt = 0; 63 | tipebeep = 0; 64 | } 65 | 66 | if (beep) { 67 | digitalWrite(buzzer, HIGH); 68 | } else { 69 | digitalWrite(buzzer, LOW); 70 | } 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-23/Buzzer.h: -------------------------------------------------------------------------------- 1 | // BUZZER 2 | const int buzzer = 3; // Pin GPIO Buzzer - RX 3 | 4 | 5 | 6 | //---------------------------------------------------------------------- 7 | // BUNYI BEEP BUZZER 8 | 9 | int detikbeep; 10 | 11 | void BunyiBeep(uint8_t tipebeep, uint8_t durasibeep) { 12 | 13 | static uint32_t pMBuzT; 14 | static uint32_t pMBuzB; 15 | static boolean beep; 16 | static uint8_t dt; 17 | 18 | if (millis() - pMBuzB >= 1000) { 19 | detikbeep++; 20 | pMBuzB = millis(); 21 | } 22 | 23 | if (detikbeep < durasibeep) { 24 | tipebeep = tipebeep; 25 | } else { 26 | tipebeep = 0; 27 | durasibeep = 0; 28 | //db = 0; 29 | } 30 | 31 | if (tipebeep == 0) { 32 | digitalWrite(buzzer, LOW); 33 | } 34 | 35 | if (tipebeep == 1) { 36 | if (millis() - pMBuzT >= 500) { 37 | dt++; 38 | beep = !beep; 39 | pMBuzT = millis(); 40 | } 41 | 42 | if (dt == 6) { 43 | dt = 0; 44 | tipebeep = 0; 45 | } 46 | 47 | if (beep) { 48 | digitalWrite(buzzer, HIGH); 49 | } else { 50 | digitalWrite(buzzer, LOW); 51 | } 52 | } 53 | 54 | if (tipebeep == 2) { 55 | if (millis() - pMBuzT >= 1000) { 56 | dt++; 57 | beep = !beep; 58 | pMBuzT = millis(); 59 | } 60 | 61 | if (dt == 6) { 62 | dt = 0; 63 | tipebeep = 0; 64 | } 65 | 66 | if (beep) { 67 | digitalWrite(buzzer, HIGH); 68 | } else { 69 | digitalWrite(buzzer, LOW); 70 | } 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-24/Buzzer.h: -------------------------------------------------------------------------------- 1 | // BUZZER 2 | const int buzzer = 3; // Pin GPIO Buzzer - RX 3 | 4 | 5 | 6 | //---------------------------------------------------------------------- 7 | // BUNYI BEEP BUZZER 8 | 9 | int detikbeep; 10 | 11 | void BunyiBeep(uint8_t tipebeep, uint8_t durasibeep) { 12 | 13 | static uint32_t pMBuzT; 14 | static uint32_t pMBuzB; 15 | static boolean beep; 16 | static uint8_t dt; 17 | 18 | if (millis() - pMBuzB >= 1000) { 19 | detikbeep++; 20 | pMBuzB = millis(); 21 | } 22 | 23 | if (detikbeep < durasibeep) { 24 | tipebeep = tipebeep; 25 | } else { 26 | tipebeep = 0; 27 | durasibeep = 0; 28 | //db = 0; 29 | } 30 | 31 | if (tipebeep == 0) { 32 | digitalWrite(buzzer, LOW); 33 | } 34 | 35 | if (tipebeep == 1) { 36 | if (millis() - pMBuzT >= 500) { 37 | dt++; 38 | beep = !beep; 39 | pMBuzT = millis(); 40 | } 41 | 42 | if (dt == 6) { 43 | dt = 0; 44 | tipebeep = 0; 45 | } 46 | 47 | if (beep) { 48 | digitalWrite(buzzer, HIGH); 49 | } else { 50 | digitalWrite(buzzer, LOW); 51 | } 52 | } 53 | 54 | if (tipebeep == 2) { 55 | if (millis() - pMBuzT >= 1000) { 56 | dt++; 57 | beep = !beep; 58 | pMBuzT = millis(); 59 | } 60 | 61 | if (dt == 6) { 62 | dt = 0; 63 | tipebeep = 0; 64 | } 65 | 66 | if (beep) { 67 | digitalWrite(buzzer, HIGH); 68 | } else { 69 | digitalWrite(buzzer, LOW); 70 | } 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-17/WebServer.h: -------------------------------------------------------------------------------- 1 | 2 | // WIFI 3 | 4 | // LED Internal 5 | uint8_t pin_led = 2; 6 | 7 | //WEB Server 8 | ESP8266WebServer server(80); 9 | 10 | // Sebagai Station 11 | const char* wifissid = "grobak.net"; //kalau gagal konek 12 | const char* wifipassword = ""; 13 | 14 | // Sebagai AccessPoint 15 | const char* ssid = "JWSP10"; //kalau gagal konek 16 | const char* password = "elektronmart"; 17 | 18 | IPAddress local_ip(192, 168, 4, 1); 19 | IPAddress gateway(192, 168, 4, 1); 20 | IPAddress netmask(255, 255, 255, 0); 21 | 22 | 23 | 24 | void wifiConnect() { 25 | 26 | WiFi.softAPdisconnect(true); 27 | WiFi.disconnect(); 28 | delay(1000); 29 | 30 | Serial.println("Wifi Sation Mode"); 31 | WiFi.mode(WIFI_STA); 32 | WiFi.begin(wifissid, wifipassword); 33 | 34 | unsigned long startTime = millis(); 35 | 36 | while (WiFi.status() != WL_CONNECTED) { 37 | 38 | delay(500); 39 | Serial.print("."); 40 | digitalWrite(pin_led, !digitalRead(pin_led)); 41 | if (millis() - startTime > 3000) break; 42 | 43 | } 44 | 45 | if (WiFi.status() == WL_CONNECTED) { 46 | 47 | digitalWrite(pin_led, HIGH); 48 | 49 | } else { 50 | 51 | Serial.println("Wifi AP Mode"); 52 | WiFi.mode(WIFI_AP); 53 | WiFi.softAPConfig(local_ip, gateway, netmask); 54 | WiFi.softAP(ssid, password); 55 | digitalWrite(pin_led, LOW); 56 | 57 | } 58 | 59 | //Serial.println(""); 60 | WiFi.printDiag(Serial); 61 | Serial.print("MAC: "); 62 | Serial.println(WiFi.macAddress()); 63 | Serial.print("IP: "); 64 | Serial.println(WiFi.localIP()); 65 | 66 | } 67 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-18/WebServer.h: -------------------------------------------------------------------------------- 1 | 2 | // WIFI 3 | 4 | // LED Internal 5 | uint8_t pin_led = 2; 6 | 7 | //WEB Server 8 | ESP8266WebServer server(80); 9 | 10 | // Sebagai Station 11 | const char* wifissid = "grobak.net"; //kalau gagal konek 12 | const char* wifipassword = ""; 13 | 14 | // Sebagai AccessPoint 15 | const char* ssid = "JWSP10"; //kalau gagal konek 16 | const char* password = "elektronmart"; 17 | 18 | IPAddress local_ip(192, 168, 4, 1); 19 | IPAddress gateway(192, 168, 4, 1); 20 | IPAddress netmask(255, 255, 255, 0); 21 | 22 | 23 | 24 | void wifiConnect() { 25 | 26 | WiFi.softAPdisconnect(true); 27 | WiFi.disconnect(); 28 | delay(1000); 29 | 30 | Serial.println("Wifi Sation Mode"); 31 | WiFi.mode(WIFI_STA); 32 | WiFi.begin(wifissid, wifipassword); 33 | 34 | unsigned long startTime = millis(); 35 | 36 | while (WiFi.status() != WL_CONNECTED) { 37 | 38 | delay(500); 39 | Serial.print("."); 40 | digitalWrite(pin_led, !digitalRead(pin_led)); 41 | if (millis() - startTime > 3000) break; 42 | 43 | } 44 | 45 | if (WiFi.status() == WL_CONNECTED) { 46 | 47 | digitalWrite(pin_led, HIGH); 48 | 49 | } else { 50 | 51 | Serial.println("Wifi AP Mode"); 52 | WiFi.mode(WIFI_AP); 53 | WiFi.softAPConfig(local_ip, gateway, netmask); 54 | WiFi.softAP(ssid, password); 55 | digitalWrite(pin_led, LOW); 56 | 57 | } 58 | 59 | //Serial.println(""); 60 | WiFi.printDiag(Serial); 61 | Serial.print("MAC: "); 62 | Serial.println(WiFi.macAddress()); 63 | Serial.print("IP: "); 64 | Serial.println(WiFi.localIP()); 65 | 66 | } 67 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-19/WebServer.h: -------------------------------------------------------------------------------- 1 | 2 | // WIFI 3 | 4 | // LED Internal 5 | uint8_t pin_led = 2; 6 | 7 | //WEB Server 8 | ESP8266WebServer server(80); 9 | 10 | // Sebagai Station 11 | const char* wifissid = "grobak.net"; //kalau gagal konek 12 | const char* wifipassword = ""; 13 | 14 | // Sebagai AccessPoint 15 | const char* ssid = "JWSP10"; //kalau gagal konek 16 | const char* password = "elektronmart"; 17 | 18 | IPAddress local_ip(192, 168, 4, 1); 19 | IPAddress gateway(192, 168, 4, 1); 20 | IPAddress netmask(255, 255, 255, 0); 21 | 22 | 23 | 24 | void wifiConnect() { 25 | 26 | WiFi.softAPdisconnect(true); 27 | WiFi.disconnect(); 28 | delay(1000); 29 | 30 | Serial.println("Wifi Sation Mode"); 31 | WiFi.mode(WIFI_STA); 32 | WiFi.begin(wifissid, wifipassword); 33 | 34 | unsigned long startTime = millis(); 35 | 36 | while (WiFi.status() != WL_CONNECTED) { 37 | 38 | delay(500); 39 | Serial.print("."); 40 | digitalWrite(pin_led, !digitalRead(pin_led)); 41 | if (millis() - startTime > 3000) break; 42 | 43 | } 44 | 45 | if (WiFi.status() == WL_CONNECTED) { 46 | 47 | digitalWrite(pin_led, HIGH); 48 | 49 | } else { 50 | 51 | Serial.println("Wifi AP Mode"); 52 | WiFi.mode(WIFI_AP); 53 | WiFi.softAPConfig(local_ip, gateway, netmask); 54 | WiFi.softAP(ssid, password); 55 | digitalWrite(pin_led, LOW); 56 | 57 | } 58 | 59 | //Serial.println(""); 60 | WiFi.printDiag(Serial); 61 | Serial.print("MAC: "); 62 | Serial.println(WiFi.macAddress()); 63 | Serial.print("IP: "); 64 | Serial.println(WiFi.localIP()); 65 | 66 | } 67 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-20/WebServer.h: -------------------------------------------------------------------------------- 1 | 2 | // WIFI 3 | 4 | // LED Internal 5 | uint8_t pin_led = 2; 6 | 7 | //WEB Server 8 | ESP8266WebServer server(80); 9 | 10 | // Sebagai Station 11 | const char* wifissid = "grobak.net"; //kalau gagal konek 12 | const char* wifipassword = ""; 13 | 14 | // Sebagai AccessPoint 15 | const char* ssid = "JWSP10"; //kalau gagal konek 16 | const char* password = "elektronmart"; 17 | 18 | IPAddress local_ip(192, 168, 4, 1); 19 | IPAddress gateway(192, 168, 4, 1); 20 | IPAddress netmask(255, 255, 255, 0); 21 | 22 | 23 | 24 | void wifiConnect() { 25 | 26 | WiFi.softAPdisconnect(true); 27 | WiFi.disconnect(); 28 | delay(1000); 29 | 30 | Serial.println("Wifi Sation Mode"); 31 | WiFi.mode(WIFI_STA); 32 | WiFi.begin(wifissid, wifipassword); 33 | 34 | unsigned long startTime = millis(); 35 | 36 | while (WiFi.status() != WL_CONNECTED) { 37 | 38 | delay(500); 39 | Serial.print("."); 40 | digitalWrite(pin_led, !digitalRead(pin_led)); 41 | if (millis() - startTime > 3000) break; 42 | 43 | } 44 | 45 | if (WiFi.status() == WL_CONNECTED) { 46 | 47 | digitalWrite(pin_led, HIGH); 48 | 49 | } else { 50 | 51 | Serial.println("Wifi AP Mode"); 52 | WiFi.mode(WIFI_AP); 53 | WiFi.softAPConfig(local_ip, gateway, netmask); 54 | WiFi.softAP(ssid, password); 55 | digitalWrite(pin_led, LOW); 56 | 57 | } 58 | 59 | //Serial.println(""); 60 | WiFi.printDiag(Serial); 61 | Serial.print("MAC: "); 62 | Serial.println(WiFi.macAddress()); 63 | Serial.print("IP: "); 64 | Serial.println(WiFi.localIP()); 65 | 66 | } 67 | -------------------------------------------------------------------------------- /Oprekan/7Segment8Digit74HC595.ino: -------------------------------------------------------------------------------- 1 | // 8 Digit Seven Segment LED RobotDyn 74HC595 - elektronmart.com 2 | // 3 | // 1. Pemetaan Segmen dan Tipe Anoda/Katoda // Mapping Segment and Type Anode/Cathode 4 | // 2. Cari MSB atau LSB (MSB binary kanan ke kiri, LSB binary kiri ke kanan) // Find MSB or LSB (MSB binary right to left, LSB binary left to right) 5 | // 3. Pemetaan Karakter // Character Mapping 6 | // 4. Pemetaan Kolom // Column Mapping 7 | 8 | #define RCK D3 // LAT / CS 9 | #define SCK D5 // CLK 10 | #define DIO D7 // DATA / DIN 11 | 12 | // Default Column {1, 2, 4, 8, 16, 32, 64, 128}; 13 | 14 | //const int kolom[] = {16, 32, 64, 128, 1, 2, 4, 8}; 15 | 16 | const byte kolom[] = {8, 4, 2, 1, 128, 64, 32, 16}; 17 | 18 | 19 | const byte nomor[] = { 20 | B00000011, // 0 B00000011 - 3 21 | B10011111, // 1 B10011111 - 159 22 | B00100101, // 2 B00100101 - 23 | B00001101, // 3 B00001101 24 | B10011001, // 4 B10011001 25 | B01001001, // 5 B01001001 26 | B01000001, // 6 B01000001 27 | B00011111, // 7 B00011111 28 | B00000001, // 8 B00000001 29 | B00001001, // 9 B00001001 30 | }; 31 | 32 | 33 | void tampilkan() { 34 | 35 | for(int i = 0; i < 10; i++) { 36 | for(int k = 0; k < 8; k++) { 37 | digitalWrite(RCK, LOW); 38 | shiftOut(DIO, SCK, LSBFIRST, nomor[i]); // Character 39 | shiftOut(DIO, SCK, LSBFIRST, kolom[k]); // Column 40 | digitalWrite(RCK, HIGH); 41 | delay (100); 42 | } 43 | } 44 | } 45 | 46 | 47 | void setup() { 48 | 49 | Serial.begin(115200); 50 | pinMode(RCK, OUTPUT); 51 | pinMode(SCK, OUTPUT); 52 | pinMode(DIO, OUTPUT); 53 | 54 | } 55 | 56 | 57 | void loop() { 58 | 59 | tampilkan(); 60 | 61 | } 62 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-17/FSConfig.h: -------------------------------------------------------------------------------- 1 | 2 | // PrayerTimes 3 | double times[sizeof(TimeName)/sizeof(char*)]; 4 | int ihti = 2; 5 | 6 | int detikiqmh; 7 | int menitiqmh; 8 | 9 | uint8_t tmputama; 10 | uint8_t tmpjws; 11 | uint8_t tmpinfo; 12 | 13 | 14 | //---------------------------------------------------------------------- 15 | //TAMPILKAN JADWAL SHOLAT 16 | 17 | void JadwalSholat() { 18 | 19 | /* 20 | CALCULATION METHOD 21 | ------------------ 22 | Jafari, // Ithna Ashari 23 | Karachi, // University of Islamic Sciences, Karachi 24 | ISNA, // Islamic Society of North America (ISNA) 25 | MWL, // Muslim World League (MWL) 26 | Makkah, // Umm al-Qura, Makkah 27 | Egypt, // Egyptian General Authority of Survey 28 | Custom, // Custom Setting 29 | 30 | JURISTIC 31 | -------- 32 | Shafii, // Shafii (standard) 33 | Hanafi, // Hanafi 34 | 35 | ADJUSTING METHOD 36 | ---------------- 37 | None, // No adjustment 38 | MidNight, // middle of night 39 | OneSeventh, // 1/7th of night 40 | AngleBased, // angle/60th of night 41 | 42 | TIME IDS 43 | -------- 44 | Fajr, 45 | Sunrise, 46 | Dhuhr, 47 | Asr, 48 | Sunset, 49 | Maghrib, 50 | Isha 51 | 52 | */ 53 | 54 | RtcDateTime now = Rtc.GetDateTime(); 55 | 56 | int tahun = now.Year(); 57 | int bulan = now.Month(); 58 | int tanggal = now.Day(); 59 | float latitude = -6.16; 60 | float longitude = 106.61; 61 | int zonawaktu = 7; 62 | 63 | set_calc_method(Karachi); 64 | set_asr_method(Shafii); 65 | set_high_lats_adjust_method(AngleBased); 66 | set_fajr_angle(20); 67 | set_isha_angle(18); 68 | 69 | get_prayer_times(tahun, bulan, tanggal, latitude, longitude, zonawaktu, times); 70 | 71 | } 72 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-21/WebServer.h: -------------------------------------------------------------------------------- 1 | 2 | // WIFI 3 | 4 | // LED Internal 5 | uint8_t pin_led = 2; 6 | 7 | //WEB Server 8 | ESP8266WebServer server(80); 9 | ESP8266HTTPUpdateServer httpUpdater; 10 | 11 | // Sebagai Station 12 | const char* wifissid = "grobak.net"; //kalau gagal konek 13 | const char* wifipassword = ""; 14 | 15 | // Sebagai AccessPoint 16 | const char* ssid = "JWSP10"; //kalau gagal konek 17 | const char* password = "elektronmart"; 18 | 19 | IPAddress local_ip(192, 168, 4, 1); 20 | IPAddress gateway(192, 168, 4, 1); 21 | IPAddress netmask(255, 255, 255, 0); 22 | 23 | 24 | 25 | void wifiConnect() { 26 | 27 | WiFi.softAPdisconnect(true); 28 | WiFi.disconnect(); 29 | delay(1000); 30 | 31 | Serial.println("Mencoba sambungan ke Hotspot atau Router"); 32 | WiFi.mode(WIFI_STA); 33 | WiFi.begin(wifissid, wifipassword); 34 | 35 | unsigned long startTime = millis(); 36 | 37 | while (WiFi.status() != WL_CONNECTED) { 38 | 39 | delay(500); 40 | Serial.print("."); 41 | 42 | digitalWrite(pin_led, !digitalRead(pin_led)); 43 | 44 | if (millis() - startTime > 3000) { 45 | Serial.println(" "); 46 | break; 47 | } 48 | 49 | } 50 | 51 | if (WiFi.status() == WL_CONNECTED) { 52 | 53 | digitalWrite(pin_led, HIGH); 54 | Serial.print("MAC: "); 55 | Serial.println(WiFi.macAddress()); 56 | Serial.print("IP: "); 57 | Serial.println(WiFi.localIP()); 58 | 59 | } else { 60 | 61 | Serial.println("Gagal tersambung ke Hotspot, mode Hotspot aktif."); 62 | 63 | WiFi.mode(WIFI_AP); 64 | WiFi.softAPConfig(local_ip, gateway, netmask); 65 | WiFi.softAP(ssid, password); 66 | 67 | digitalWrite(pin_led, LOW); 68 | 69 | Serial.print("MAC: "); 70 | Serial.println(WiFi.macAddress()); 71 | Serial.print("IP: "); 72 | Serial.println(local_ip); 73 | 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-22/WebServer.h: -------------------------------------------------------------------------------- 1 | 2 | // WIFI 3 | 4 | // LED Internal 5 | uint8_t pin_led = 2; 6 | 7 | //WEB Server 8 | ESP8266WebServer server(80); 9 | ESP8266HTTPUpdateServer httpUpdater; 10 | 11 | // Sebagai Station 12 | const char* wifissid = "grobak.net"; //kalau gagal konek 13 | const char* wifipassword = ""; 14 | 15 | // Sebagai AccessPoint 16 | const char* ssid = "JWSP10"; //kalau gagal konek 17 | const char* password = "elektronmart"; 18 | 19 | IPAddress local_ip(192, 168, 4, 1); 20 | IPAddress gateway(192, 168, 4, 1); 21 | IPAddress netmask(255, 255, 255, 0); 22 | 23 | 24 | 25 | void wifiConnect() { 26 | 27 | WiFi.softAPdisconnect(true); 28 | WiFi.disconnect(); 29 | delay(1000); 30 | 31 | Serial.println("Mencoba sambungan ke Hotspot atau Router"); 32 | WiFi.mode(WIFI_STA); 33 | WiFi.begin(wifissid, wifipassword); 34 | 35 | unsigned long startTime = millis(); 36 | 37 | while (WiFi.status() != WL_CONNECTED) { 38 | 39 | delay(500); 40 | Serial.print("."); 41 | 42 | digitalWrite(pin_led, !digitalRead(pin_led)); 43 | 44 | if (millis() - startTime > 3000) { 45 | Serial.println(" "); 46 | break; 47 | } 48 | 49 | } 50 | 51 | if (WiFi.status() == WL_CONNECTED) { 52 | 53 | digitalWrite(pin_led, HIGH); 54 | Serial.print("MAC: "); 55 | Serial.println(WiFi.macAddress()); 56 | Serial.print("IP: "); 57 | Serial.println(WiFi.localIP()); 58 | 59 | } else { 60 | 61 | Serial.println("Gagal tersambung ke Hotspot, mode Hotspot aktif."); 62 | 63 | WiFi.mode(WIFI_AP); 64 | WiFi.softAPConfig(local_ip, gateway, netmask); 65 | WiFi.softAP(ssid, password); 66 | 67 | digitalWrite(pin_led, LOW); 68 | 69 | Serial.print("MAC: "); 70 | Serial.println(WiFi.macAddress()); 71 | Serial.print("IP: "); 72 | Serial.println(local_ip); 73 | 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-23/WebServer.h: -------------------------------------------------------------------------------- 1 | 2 | // WIFI 3 | 4 | // LED Internal 5 | uint8_t pin_led = 2; 6 | 7 | //WEB Server 8 | ESP8266WebServer server(80); 9 | ESP8266HTTPUpdateServer httpUpdater; 10 | 11 | // Sebagai Station 12 | const char* wifissid = "grobak.net"; //kalau gagal konek 13 | const char* wifipassword = ""; 14 | 15 | // Sebagai AccessPoint 16 | const char* ssid = "JWSP10"; //kalau gagal konek 17 | const char* password = "elektronmart"; 18 | 19 | IPAddress local_ip(192, 168, 4, 1); 20 | IPAddress gateway(192, 168, 4, 1); 21 | IPAddress netmask(255, 255, 255, 0); 22 | 23 | 24 | 25 | void wifiConnect() { 26 | 27 | WiFi.softAPdisconnect(true); 28 | WiFi.disconnect(); 29 | delay(1000); 30 | 31 | Serial.println("Mencoba sambungan ke Hotspot atau Router"); 32 | WiFi.mode(WIFI_STA); 33 | WiFi.begin(wifissid, wifipassword); 34 | 35 | unsigned long startTime = millis(); 36 | 37 | while (WiFi.status() != WL_CONNECTED) { 38 | 39 | delay(500); 40 | Serial.print("."); 41 | 42 | digitalWrite(pin_led, !digitalRead(pin_led)); 43 | 44 | if (millis() - startTime > 3000) { 45 | Serial.println(" "); 46 | break; 47 | } 48 | 49 | } 50 | 51 | if (WiFi.status() == WL_CONNECTED) { 52 | 53 | digitalWrite(pin_led, HIGH); 54 | Serial.print("MAC: "); 55 | Serial.println(WiFi.macAddress()); 56 | Serial.print("IP: "); 57 | Serial.println(WiFi.localIP()); 58 | 59 | } else { 60 | 61 | Serial.println("Gagal tersambung ke Hotspot, mode Hotspot aktif."); 62 | 63 | WiFi.mode(WIFI_AP); 64 | WiFi.softAPConfig(local_ip, gateway, netmask); 65 | WiFi.softAP(ssid, password); 66 | 67 | digitalWrite(pin_led, LOW); 68 | 69 | Serial.print("MAC: "); 70 | Serial.println(WiFi.macAddress()); 71 | Serial.print("IP: "); 72 | Serial.println(local_ip); 73 | 74 | } 75 | 76 | } 77 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-MAX7219/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## JWS - Jadwal Waktu Sholat 3 | 4 | Jadwal Waktu Sholat menggunakan hardware: 5 | 6 | NodeMCU ESP8266 7 | - https://www.tokopedia.com/elektronmartcom/nodemcu-esp8266-v3-lua-wifi-board-cp2102 8 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1fl2z9z-jual-nodemcu-esp8266-v3-lua-wifi-board-cp2102 9 | 10 | RTC DS3231 11 | - https://www.tokopedia.com/elektronmartcom/rtc-ds3231-at24c32-iic-precision-clock-module-ds3231sn-without-battery 12 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1flsmxn-jual-rtc-ds3231sn-at24c32-iic-precision-clock-module-without-battery 13 | 14 | Led Matrix MAX7219 15 | - https://www.tokopedia.com/elektronmartcom/led-dot-matrix-max7219-4-in-1-display-green-hijau 16 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1flxxkk-jual-led-dot-matrix-max7219-4-in-1-display-red-merah 17 | 18 | Buzzer 19 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1fo3u1t-jual-piezo-active-buzzer-5v 20 | - https://www.tokopedia.com/elektronmartcom/piezo-active-buzzer-5v 21 | 22 | ### FITUR 23 | 24 | - Waktu 24 Jam 25 | - Jadwal Sholat 5 Waktu dan Tanbih Imsak 26 | - Alarm Adzan Waktu Solat dan Tanbih Imsak 27 | - Tanggal 28 | - Suhu 29 | - Hitung Mundur Iqomah 30 | - Setting Jam dan Tanggal via Wifi 31 | 32 | ### Pin on MAX7219 1x4 Panel 33 | 34 | | NodeMCU | MAX7219 | 35 | | ------- | -------- | 36 | | D7 | DIN | 37 | | D5 | CLK | 38 | | D3 | DS(LOAD) | 39 | 40 | Vin & GND NodeMCU to 5V Power Supply 41 | VCC & GND MAX7219 Panel to 5V Power Supply 42 | 43 | ### Pin on RTC DS3231 44 | 45 | | NODEMCU | DS3231 | 46 | | ------- | ------ | 47 | | D1 | SCL | 48 | | D2 | SDA | 49 | 50 | VCC and GND DS3231 Module to 5V Power Supply 51 | 52 | ### Pin on Buzzer 53 | 54 | | NODEMCU | BUZZER | 55 | | ------- | ------ | 56 | | D6 | + | 57 | | G | GND | 58 | 59 | ### Eksternal Library 60 | - 61 | - "PrayerTimes.h" 62 | - 63 | - 64 | - 65 | 66 | 67 | > email : bonny@grobak.net - www.grobak.net 68 | -------------------------------------------------------------------------------- /Oprekan/Joystick.ino: -------------------------------------------------------------------------------- 1 | // WIRING JOYSTICK NODEMCU ESP8266 - ELEKTRONMART.COM 2 | // ------------------------------------------ 3 | // SW > D0 > R10K > 3.3V (di pullup R10K) 4 | // GND > GND 5 | // VRX > A0 6 | // VRY (tidak dipakai karena ESP8266 hanya memiliki 1 pin analog 7 | 8 | 9 | #define pinLED D4 // pin LED internal ESP12 10 | #define pinTombol D0 // pin Tombol 11 | #define pinVRX A0 // Analog VRx 12 | 13 | int koordinatX; // untuk menampung nilai Analog VRx 14 | int nilaiTombol = 0; // untuk nampung nilai tombol tengah joystick 15 | 16 | boolean statusLed; // Menampung nilai status LED On atau Off 17 | boolean statusTombol; // Menampung nilai status Tombol On atau Off 18 | 19 | 20 | 21 | void setup() { 22 | 23 | Serial.begin(115200); 24 | 25 | pinMode(pinLED, OUTPUT); 26 | pinMode(pinTombol, INPUT); 27 | digitalWrite(pinLED, HIGH); // LOW nyala, HIGH mati 28 | 29 | } 30 | 31 | 32 | void loop() { 33 | 34 | // Baca nilai Analog X: 35 | koordinatX = analogRead(pinVRX); 36 | 37 | // Baca nilai Tombol Tengah: 38 | nilaiTombol = digitalRead(pinTombol); 39 | 40 | // Fungsi mengedipkan LED 41 | ledKedip(); 42 | 43 | // Fungsi pengaturan respon dari Joystick 44 | cekJoystick(); 45 | 46 | } 47 | 48 | 49 | 50 | // Fungsi mengedipkan LED 51 | 52 | void ledKedip() { 53 | 54 | static long pM; 55 | 56 | // Kedipkan LED dengan kecepatan sesuai koordinat 57 | if (millis() - pM > koordinatX) { 58 | statusLed =! statusLed; 59 | pM = millis(); 60 | } 61 | 62 | } 63 | 64 | 65 | 66 | // Fungsi pengaturan respon dari Joystick 67 | 68 | void cekJoystick() { 69 | 70 | // Joystick Click Tombol Tengah 71 | // Nyalakan LED jika ditekan 72 | 73 | if(nilaiTombol == LOW){ 74 | statusTombol =! statusTombol; 75 | delay(250); 76 | } 77 | 78 | // Joystick X Analog 79 | static long pM; 80 | 81 | if(millis()-pM > 100) { 82 | 83 | if (koordinatX <= 450 or koordinatX >= 550 ) { 84 | Serial.print("Koordinat X : "); Serial.println(koordinatX); 85 | digitalWrite(pinLED, statusLed); 86 | } else { 87 | digitalWrite(pinLED, statusTombol); 88 | } 89 | 90 | pM = millis(); 91 | } 92 | 93 | } 94 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-1Panel/libraries/HJS589/fonts/ElektronMartArabic5x6.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * ElektronMartArabic5x6 4 | * 5 | * 6 | * File Name : ElektronMartArabic5x6.h 7 | * Date : 6 Sept 2019 8 | * Font width : 6 9 | * Font height : 16 10 | * Font first char : 32 11 | * Font last char : 127 12 | * Font used chars : 94 13 | * 14 | * The font data are defined as 15 | * 16 | * struct _FONT_ { 17 | * uint16_t font_Size_in_Bytes_over_all_included_Size_it_self; 18 | * uint8_t font_Width_in_Pixel_for_fixed_drawing; 19 | * uint8_t font_Height_in_Pixel_for_all_characters; 20 | * unit8_t font_First_Char; 21 | * uint8_t font_Char_Count; 22 | * 23 | * uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1]; 24 | * // for each character the separate width in pixels, 25 | * // characters < 128 have an implicit virtual right empty row 26 | * 27 | * uint8_t font_data[]; 28 | * // bit field of all characters 29 | */ 30 | 31 | #include 32 | #ifdef __AVR__ 33 | #include 34 | #elif defined (ESP8266) 35 | #include 36 | #else 37 | #define PROGMEM 38 | #endif 39 | 40 | #ifndef ELEKTRONMARTARABIC5x6_H 41 | #define ELEKTRONMARTARABIC5x6_H 42 | 43 | #define ELEKTRONMARTARABIC5x6_WIDTH 5 44 | #define ELEKTRONMARTARABIC5x6_HEIGHT 8 45 | 46 | const static uint8_t ElektronMartArabic5x6[] PROGMEM = { 47 | 0x03, 0x07, // size // size of zero indicates fixed width font, actual length is width * height 48 | 0x05, // width 49 | 0x08, // height 50 | 0x30, // first char 51 | 0x0A, // char count 52 | 53 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 54 | 0x05, 0x05, 55 | 56 | // font data | 57 | 0x10, 0x38, 0x7c, 0x38, 0x10, //0 58 | 0x00, 0x3e, 0x7c, 0x00, 0x00, //1 59 | 0x3e, 0x7e, 0x06, 0x06, 0x04, //2 60 | 0x3e, 0x7c, 0x06, 0x04, 0x06, //3 61 | 0x3e, 0x6a, 0x6a, 0x6a, 0x60, //4 62 | 0x38, 0x7c, 0x66, 0x7c, 0x78, //5 63 | 0x06, 0x06, 0x06, 0x3e, 0x7c, //6 64 | 0x3e, 0x7e, 0x60, 0x7e, 0x3c, //7 65 | 0x3c, 0x7e, 0x06, 0x7e, 0x7c, //8 66 | 0x0e, 0x1e, 0x12, 0x3e, 0x7c //9 67 | 68 | }; 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-2Panel/libraries/HJS589/fonts/ElektronMartArabic5x6.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * ElektronMartArabic5x6 4 | * 5 | * 6 | * File Name : ElektronMartArabic5x6.h 7 | * Date : 6 Sept 2019 8 | * Font width : 6 9 | * Font height : 16 10 | * Font first char : 32 11 | * Font last char : 127 12 | * Font used chars : 94 13 | * 14 | * The font data are defined as 15 | * 16 | * struct _FONT_ { 17 | * uint16_t font_Size_in_Bytes_over_all_included_Size_it_self; 18 | * uint8_t font_Width_in_Pixel_for_fixed_drawing; 19 | * uint8_t font_Height_in_Pixel_for_all_characters; 20 | * unit8_t font_First_Char; 21 | * uint8_t font_Char_Count; 22 | * 23 | * uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1]; 24 | * // for each character the separate width in pixels, 25 | * // characters < 128 have an implicit virtual right empty row 26 | * 27 | * uint8_t font_data[]; 28 | * // bit field of all characters 29 | */ 30 | 31 | #include 32 | #ifdef __AVR__ 33 | #include 34 | #elif defined (ESP8266) 35 | #include 36 | #else 37 | #define PROGMEM 38 | #endif 39 | 40 | #ifndef ELEKTRONMARTARABIC5x6_H 41 | #define ELEKTRONMARTARABIC5x6_H 42 | 43 | #define ELEKTRONMARTARABIC5x6_WIDTH 5 44 | #define ELEKTRONMARTARABIC5x6_HEIGHT 8 45 | 46 | const static uint8_t ElektronMartArabic5x6[] PROGMEM = { 47 | 0x03, 0x07, // size // size of zero indicates fixed width font, actual length is width * height 48 | 0x05, // width 49 | 0x08, // height 50 | 0x30, // first char 51 | 0x0A, // char count 52 | 53 | 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 54 | 0x05, 0x05, 55 | 56 | // font data | 57 | 0x10, 0x38, 0x7c, 0x38, 0x10, //0 58 | 0x00, 0x3e, 0x7c, 0x00, 0x00, //1 59 | 0x3e, 0x7e, 0x06, 0x06, 0x04, //2 60 | 0x3e, 0x7c, 0x06, 0x04, 0x06, //3 61 | 0x3e, 0x6a, 0x6a, 0x6a, 0x60, //4 62 | 0x38, 0x7c, 0x66, 0x7c, 0x78, //5 63 | 0x06, 0x06, 0x06, 0x3e, 0x7c, //6 64 | 0x3e, 0x7e, 0x60, 0x7e, 0x3c, //7 65 | 0x3c, 0x7e, 0x06, 0x7e, 0x7c, //8 66 | 0x0e, 0x1e, 0x12, 0x3e, 0x7c //9 67 | 68 | }; 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-1Panel/libraries/HJS589/HJS589.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------------------------------------------------- 2 | 3 | DMD.cpp - Function and support library for the Freetronics DMD, a 512 LED matrix display 4 | panel arranged in a 32 x 16 layout. 5 | 6 | Copyright (C) 2011 Marc Alexander (info freetronics com) 7 | 8 | Note that the DMD library uses the SPI port for the fastest, low overhead writing to the 9 | display. Keep an eye on conflicts if there are any other devices running from the same 10 | SPI port, and that the chip select on those devices is correctly set to be inactive 11 | when the DMD is being written to. 12 | 13 | --- 14 | 15 | This program is free software: you can redistribute it and/or modify it under the terms 16 | of the version 3 GNU General Public License as published by the Free Software Foundation. 17 | 18 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 19 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | See the GNU General Public License for more details. 21 | 22 | You should have received a copy of the GNU General Public License along with this program. 23 | If not, see . 24 | 25 | --------------------------------------------------------------------------------------*/ 26 | 27 | 28 | #ifndef HJS589_H 29 | #define HJS589_H 30 | #include 31 | #include 32 | 33 | class HJS589 : public Bitmap 34 | { 35 | public: 36 | explicit HJS589(int widthPanels = 1, int heightPanels = 1); 37 | ~HJS589(); 38 | 39 | bool doubleBuffer() const { return _doubleBuffer; } 40 | void setDoubleBuffer(bool doubleBuffer); 41 | void swapBuffers(); 42 | void swapBuffersAndCopy(); 43 | 44 | void loop(); 45 | void refresh(); 46 | 47 | void start(); 48 | void disableTimer1(); 49 | 50 | void enableTimer2(); 51 | void disableTimer2(); 52 | void setBrightness(uint16_t crh); 53 | static Color fromRGB(uint8_t r, uint8_t g, uint8_t b); 54 | 55 | private: 56 | // Disable copy constructor and operator=(). 57 | HJS589(const HJS589 &other) : Bitmap(other) {} 58 | HJS589 &operator=(const HJS589 &) { return *this; } 59 | uint16_t cr; 60 | 61 | bool _doubleBuffer; 62 | volatile uint8_t phase; 63 | uint8_t *fb0; 64 | uint8_t *fb1; 65 | uint8_t *displayfb; 66 | unsigned long lastRefresh; 67 | }; 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-2Panel/libraries/HJS589/HJS589.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------------------------------------------------- 2 | 3 | DMD.cpp - Function and support library for the Freetronics DMD, a 512 LED matrix display 4 | panel arranged in a 32 x 16 layout. 5 | 6 | Copyright (C) 2011 Marc Alexander (info freetronics com) 7 | 8 | Note that the DMD library uses the SPI port for the fastest, low overhead writing to the 9 | display. Keep an eye on conflicts if there are any other devices running from the same 10 | SPI port, and that the chip select on those devices is correctly set to be inactive 11 | when the DMD is being written to. 12 | 13 | --- 14 | 15 | This program is free software: you can redistribute it and/or modify it under the terms 16 | of the version 3 GNU General Public License as published by the Free Software Foundation. 17 | 18 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 19 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | See the GNU General Public License for more details. 21 | 22 | You should have received a copy of the GNU General Public License along with this program. 23 | If not, see . 24 | 25 | --------------------------------------------------------------------------------------*/ 26 | 27 | 28 | #ifndef HJS589_H 29 | #define HJS589_H 30 | #include 31 | #include 32 | 33 | class HJS589 : public Bitmap 34 | { 35 | public: 36 | explicit HJS589(int widthPanels = 1, int heightPanels = 1); 37 | ~HJS589(); 38 | 39 | bool doubleBuffer() const { return _doubleBuffer; } 40 | void setDoubleBuffer(bool doubleBuffer); 41 | void swapBuffers(); 42 | void swapBuffersAndCopy(); 43 | 44 | void loop(); 45 | void refresh(); 46 | 47 | void start(); 48 | void disableTimer1(); 49 | 50 | void enableTimer2(); 51 | void disableTimer2(); 52 | void setBrightness(uint16_t crh); 53 | static Color fromRGB(uint8_t r, uint8_t g, uint8_t b); 54 | 55 | private: 56 | // Disable copy constructor and operator=(). 57 | HJS589(const HJS589 &other) : Bitmap(other) {} 58 | HJS589 &operator=(const HJS589 &) { return *this; } 59 | uint16_t cr; 60 | 61 | bool _doubleBuffer; 62 | volatile uint8_t phase; 63 | uint8_t *fb0; 64 | uint8_t *fb1; 65 | uint8_t *displayfb; 66 | unsigned long lastRefresh; 67 | }; 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /ArduinoNano/JadwalSholat-P10-1Panel/Readme.md: -------------------------------------------------------------------------------- 1 | # Arduino Project Grobak.Net 2 | 3 | ## JWS - Jadwal Waktu Sholat 4 | 5 | Jadwal Waktu Sholat menggunakan: 6 | 7 | Arduino Nano 8 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1fmlrqv-jual-nano-v3-mini-usb-ch340-black-compatible-arduino 9 | - https://tokopedia.link/GqZKub3EjX 10 | 11 | LED Panel P10 12 | 13 | RTC DS3231 14 | - https://www.tokopedia.com/elektronmartcom/rtc-ds3231-at24c32-iic-precision-clock-module-ds3231sn-without-battery 15 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1flsmxn-jual-rtc-ds3231sn-at24c32-iic-precision-clock-module-without-battery 16 | 17 | Buzzer 18 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1fo3u1t-jual-piezo-active-buzzer-5v 19 | - https://www.tokopedia.com/elektronmartcom/piezo-active-buzzer-5v 20 | 21 | LED Panel P10 22 | 23 | Push Button 24 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1s1wa9a-jual-switch-tactile-push-button-6x6x10mm 25 | - https://tokopedia.link/InIOtraFjX 26 | 27 | 28 | ### FITUR 29 | 30 | - Jam Besar 31 | - Jadwal Sholat 5 Waktu dan Tanbih Imsak 32 | - Alarm Adzan Waktu Solat dan Tanbih Imsak 33 | - Tanggal 34 | - Suhu 35 | - Hitung Mundur Iqomah dan dapat diset perwaktu sholat 36 | - Jam Kecil pada baris atas dan Teks Berjalan 37 | 38 | ### Pin on DMD LED P10 Panel 39 | 40 | | DMD P10 | Nano | 41 | | ------- | ----- | 42 | | A | D6 | 43 | | B | D7 | 44 | | CLK | D13 | 45 | | SCK | D8 | 46 | | R | D11 | 47 | | NOE | D9 | 48 | | GND | GND | 49 | 50 | ### Pin on RTC DS3231 51 | 52 | | DS3231 | Nano | 53 | | ------ | ---- | 54 | | SCL | A5 | 55 | | SDA | A4 | 56 | | VCC | 3V | 57 | | GND | GND | 58 | 59 | ### Pin on Buzzer 60 | 61 | | Buzzer | Nano | 62 | | ------ | ----- | 63 | | + | D2 | 64 | | - | GND | 65 | 66 | ### Pin on Push Button 67 | 68 | | Button | Nano | 69 | | ------ | ----- | 70 | | B1+ | A1 | 71 | | B1- | GND | 72 | | B2+ | A2 | 73 | | B2- | GND | 74 | | B3+ | A3 | 75 | | B3- | GND | 76 | 77 | ### Eksternal Library 78 | - DMD : https://github.com/freetronics/DMD 79 | - PrayerTime : https://github.com/asmaklad/Arduino-Prayer-Times 80 | - RTC DS3231 : https://github.com/SodaqMoja/Sodaq_DS3231 81 | 82 | ### Catatan : 83 | - Power bisa langsung dari USB Arduino Nano 84 | 85 | > email : bonny@grobak.net - www.grobak.net 86 | 87 | -------------------------------------------------------------------------------- /NodeMCU/P4P5RGB-ESP32-HUB75DMA.ino: -------------------------------------------------------------------------------- 1 | // Contoh penggunakaan PCB LED RGB elektronmart.com menggunakan library ESP32 HUB75 LED Matrix Panel DMA Faptastic 2 | // 3 | // PRODUK : 4 | // - Tokopedia.com : https://tk.tokopedia.com/ZSkBFhwgS/ 5 | // - Shopee.co.id : https://shopee.co.id/elektronmart/4635178639 6 | // 7 | // ENVIRONMENT : 8 | // - Sistem Operasi Ubuntu 24.04.2 LTS 9 | // - Arduino IDE 2.3.6 10 | // - ESP32 Core 3.2.0 - espresif 11 | // - ESP32 HUB75 LED Matrix Panel DMA Display 3.0.11 - Faptastic 12 | // 13 | 14 | #include 15 | 16 | // DEFINISI PIN PCB LED RGB NodeMCU32 / EPS32 elektronmart.com Board V1.1, V2.1 17 | 18 | #define EM_R1_PIN 2 19 | #define EM_R2_PIN 16 20 | #define EM_G1_PIN 15 21 | #define EM_G2_PIN 27 22 | #define EM_B1_PIN 4 23 | #define EM_B2_PIN 17 24 | 25 | #define EM_A_PIN 5 26 | #define EM_B_PIN 18 27 | #define EM_C_PIN 19 28 | #define EM_D_PIN 21 29 | #define EM_E_PIN 12 30 | 31 | #define EM_OE_PIN 25 32 | #define EM_CLK_PIN 22 33 | #define EM_LAT_PIN 26 34 | 35 | HUB75_I2S_CFG::i2s_pins _pins_x1 = {EM_R1_PIN, EM_G1_PIN, EM_B1_PIN, EM_R2_PIN, EM_G2_PIN, EM_B2_PIN, EM_A_PIN, EM_B_PIN, EM_C_PIN, EM_D_PIN, EM_E_PIN, EM_LAT_PIN, EM_OE_PIN, EM_CLK_PIN}; 36 | 37 | #define PANEL_RES_X 64 // Number of pixels wide of each INDIVIDUAL panel module. 38 | #define PANEL_RES_Y 32 // Number of pixels tall of each INDIVIDUAL panel module. 39 | #define PANEL_CHAIN 1 // Total number of panels chained one to another 40 | 41 | MatrixPanel_I2S_DMA *Disp = nullptr; 42 | 43 | 44 | 45 | void setup() { 46 | 47 | HUB75_I2S_CFG mxconfig( 48 | PANEL_RES_X, // module width 49 | PANEL_RES_Y, // module height 50 | PANEL_CHAIN, // Chain length 51 | _pins_x1 // pin mapping for port X1 52 | ); 53 | 54 | Disp = new MatrixPanel_I2S_DMA(mxconfig); 55 | 56 | Disp->begin(); 57 | 58 | Disp->setTextColor(Disp->color565(255, 255, 255)); 59 | 60 | Disp->setBrightness8(20); // range is 0-255, 0 - 0%, 255 - 100% 61 | Disp->setTextWrap(false); 62 | 63 | } 64 | 65 | 66 | 67 | void loop() { 68 | 69 | // Putih 70 | Disp->setTextColor(Disp->color565(255, 255, 255)); 71 | Disp->setCursor(1, 0); 72 | Disp->print("LEDRGB PTH"); 73 | // Merah 74 | Disp->setTextColor(Disp->color565(255, 0, 0)); 75 | Disp->setCursor(1, 8); 76 | Disp->print("LEDRGB MRH"); 77 | // Hijau 78 | Disp->setTextColor(Disp->color565(0, 255, 0)); 79 | Disp->setCursor(1, 16); 80 | Disp->print("LEDRGB HJU"); 81 | // Biru 82 | Disp->setTextColor(Disp->color565(0, 0, 255)); 83 | Disp->setCursor(1, 24); 84 | Disp->print("LEDRGB BRU"); 85 | 86 | } 87 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-1Panel/libraries/HJS589/fonts/ElektronMart6x16.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * ElektronMart6x16 4 | * 5 | * 6 | * File Name : ElektronMart6x16.h 7 | * Date : 6 Sept 2019 8 | * Font width : 6 9 | * Font height : 16 10 | * Font first char : 32 11 | * Font last char : 127 12 | * Font used chars : 94 13 | * 14 | * The font data are defined as 15 | * 16 | * struct _FONT_ { 17 | * uint16_t font_Size_in_Bytes_over_all_included_Size_it_self; 18 | * uint8_t font_Width_in_Pixel_for_fixed_drawing; 19 | * uint8_t font_Height_in_Pixel_for_all_characters; 20 | * unit8_t font_First_Char; 21 | * uint8_t font_Char_Count; 22 | * 23 | * uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1]; 24 | * // for each character the separate width in pixels, 25 | * // characters < 128 have an implicit virtual right empty row 26 | * 27 | * uint8_t font_data[]; 28 | * // bit field of all characters 29 | */ 30 | 31 | #include 32 | #ifdef __AVR__ 33 | #include 34 | #elif defined (ESP8266) 35 | #include 36 | #else 37 | #define PROGMEM 38 | #endif 39 | 40 | #ifndef ELEKTRONMART6x16_H 41 | #define ELEKTRONMART6x16_H 42 | 43 | #define ELEKTRONMART6x16_WIDTH 6 44 | #define ELEKTRONMART6x16_HEIGHT 16 45 | 46 | const static uint8_t ElektronMart6x16[] PROGMEM = { 47 | 0x03, 0xD0, // size // size of zero indicates fixed width font, actual length is width * height 48 | 0x06, // width 49 | 0x10, // height 50 | 0x30, // first char 51 | 0x0A, // char count 52 | 53 | 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 54 | 0x06, 0x06, 55 | 56 | // font data | 57 | 0xfe, 0xfe, 0x06, 0x06, 0xfe, 0xfc, 0x3f, 0x7f, 0x60, 0x60, 0x7f, 0x7f, //0 58 | 0x00, 0x00, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0x00, 0x00, //1 59 | 0x86, 0x86, 0x86, 0x86, 0xfe, 0xfc, 0x3f, 0x7f, 0x61, 0x61, 0x61, 0x61, //2 60 | 0x06, 0x86, 0x86, 0x86, 0xfe, 0xfc, 0x20, 0x61, 0x61, 0x61, 0x7f, 0x7f, //3 61 | 0xfe, 0xfe, 0x80, 0x80, 0xfe, 0xfc, 0x00, 0x01, 0x01, 0x01, 0x3f, 0x7f, //4 62 | 0xfe, 0xfe, 0x86, 0x86, 0x86, 0x84, 0x60, 0x61, 0x61, 0x61, 0x7f, 0x7f, //5 63 | 0xfe, 0xfe, 0x86, 0x86, 0x86, 0x84, 0x3f, 0x7f, 0x61, 0x61, 0x7f, 0x7f, //6 64 | 0x06, 0x06, 0x06, 0x06, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f, //7 65 | 0xfe, 0xfe, 0x86, 0x86, 0xfe, 0xfc, 0x3f, 0x7f, 0x61, 0x61, 0x7f, 0x7f, //8 66 | 0xfe, 0xfe, 0x86, 0x86, 0xfe, 0xfc, 0x20, 0x61, 0x61, 0x61, 0x7f, 0x7f //9 67 | 68 | }; 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-2Panel/libraries/HJS589/fonts/ElektronMart6x16.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * ElektronMart6x16 4 | * 5 | * 6 | * File Name : ElektronMart6x16.h 7 | * Date : 6 Sept 2019 8 | * Font width : 6 9 | * Font height : 16 10 | * Font first char : 32 11 | * Font last char : 127 12 | * Font used chars : 94 13 | * 14 | * The font data are defined as 15 | * 16 | * struct _FONT_ { 17 | * uint16_t font_Size_in_Bytes_over_all_included_Size_it_self; 18 | * uint8_t font_Width_in_Pixel_for_fixed_drawing; 19 | * uint8_t font_Height_in_Pixel_for_all_characters; 20 | * unit8_t font_First_Char; 21 | * uint8_t font_Char_Count; 22 | * 23 | * uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1]; 24 | * // for each character the separate width in pixels, 25 | * // characters < 128 have an implicit virtual right empty row 26 | * 27 | * uint8_t font_data[]; 28 | * // bit field of all characters 29 | */ 30 | 31 | #include 32 | #ifdef __AVR__ 33 | #include 34 | #elif defined (ESP8266) 35 | #include 36 | #else 37 | #define PROGMEM 38 | #endif 39 | 40 | #ifndef ELEKTRONMART6x16_H 41 | #define ELEKTRONMART6x16_H 42 | 43 | #define ELEKTRONMART6x16_WIDTH 6 44 | #define ELEKTRONMART6x16_HEIGHT 16 45 | 46 | const static uint8_t ElektronMart6x16[] PROGMEM = { 47 | 0x03, 0xD0, // size // size of zero indicates fixed width font, actual length is width * height 48 | 0x06, // width 49 | 0x10, // height 50 | 0x30, // first char 51 | 0x0A, // char count 52 | 53 | 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 54 | 0x06, 0x06, 55 | 56 | // font data | 57 | 0xfe, 0xfe, 0x06, 0x06, 0xfe, 0xfc, 0x3f, 0x7f, 0x60, 0x60, 0x7f, 0x7f, //0 58 | 0x00, 0x00, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0x00, 0x00, //1 59 | 0x86, 0x86, 0x86, 0x86, 0xfe, 0xfc, 0x3f, 0x7f, 0x61, 0x61, 0x61, 0x61, //2 60 | 0x06, 0x86, 0x86, 0x86, 0xfe, 0xfc, 0x20, 0x61, 0x61, 0x61, 0x7f, 0x7f, //3 61 | 0xfe, 0xfe, 0x80, 0x80, 0xfe, 0xfc, 0x00, 0x01, 0x01, 0x01, 0x3f, 0x7f, //4 62 | 0xfe, 0xfe, 0x86, 0x86, 0x86, 0x84, 0x60, 0x61, 0x61, 0x61, 0x7f, 0x7f, //5 63 | 0xfe, 0xfe, 0x86, 0x86, 0x86, 0x84, 0x3f, 0x7f, 0x61, 0x61, 0x7f, 0x7f, //6 64 | 0x06, 0x06, 0x06, 0x06, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f, //7 65 | 0xfe, 0xfe, 0x86, 0x86, 0xfe, 0xfc, 0x3f, 0x7f, 0x61, 0x61, 0x7f, 0x7f, //8 66 | 0xfe, 0xfe, 0x86, 0x86, 0xfe, 0xfc, 0x20, 0x61, 0x61, 0x61, 0x7f, 0x7f //9 67 | 68 | }; 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /ArduinoNano/JadwalSholat-P10-1Panel/fonts/angka6x13.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * System5x7 4 | * 5 | * 6 | * File Name : System5x7.h 7 | * Date : 28 Oct 2008 8 | * Font size in bytes : 470 9 | * Font width : 5 10 | * Font height : 7 11 | * Font first char : 32 12 | * Font last char : 127 13 | * Font used chars : 94 14 | * 15 | * The font data are defined as 16 | * 17 | * struct _FONT_ { 18 | * uint16_t font_Size_in_Bytes_over_all_included_Size_it_self; 19 | * uint8_t font_Width_in_Pixel_for_fixed_drawing; 20 | * uint8_t font_Height_in_Pixel_for_all_characters; 21 | * unit8_t font_First_Char; 22 | * uint8_t font_Char_Count; 23 | * 24 | * uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1]; 25 | * // for each character the separate width in pixels, 26 | * // characters < 128 have an implicit virtual right empty row 27 | * 28 | * uint8_t font_data[]; 29 | * // bit field of all characters 30 | */ 31 | 32 | #include 33 | #if (defined(__AVR__)) 34 | #include 35 | #else 36 | #include 37 | #endif 38 | 39 | #ifndef angka_H 40 | #define angka_H 41 | 42 | #define angka6x13_WIDTH 6 43 | #define angka6x13_HEIGHT 13 44 | 45 | /* 46 | * added to allow fontname to match header file name. 47 | * as well as keep the old name for backward compability 48 | */ 49 | 50 | #define angka6x13 angka6x13 51 | 52 | const static uint8_t angka6x13[] PROGMEM = { 53 | 0x03, 0xD0, 54 | 0x06, 55 | 0x0F, 56 | 0x30, 57 | 0x0A, 58 | 59 | 60 | 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 61 | 0x06, 0x06, 62 | 63 | 64 | 0xFC, 0xFE, 0x02, 0x02, 0xFE, 0xFC, 0x3F, 0x7F, 0x40, 0x40, 0x7F, 0x3F, // 48 65 | 0x08, 0x0C, 0xFE, 0xFE, 0x00, 0x00, 0x40, 0x40, 0x7F, 0x7F, 0x40, 0x40, // 49 66 | 0x0C, 0x0E, 0x02, 0xC2, 0xFE, 0x3C, 0x70, 0x7C, 0x6F, 0x63, 0x60, 0x60, // 50 67 | 0x0C, 0x8E, 0x82, 0x82, 0xFE, 0x7C, 0x30, 0x71, 0x41, 0x41, 0x7F, 0x3E, // 51 68 | 0x80, 0xE0, 0x78, 0xFE, 0xFE, 0x00, 0x0F, 0x0F, 0x48, 0x7F, 0x7F, 0x48, // 52 69 | 0x7E, 0x7E, 0x22, 0x22, 0xE2, 0xC2, 0x30, 0x70, 0x40, 0x40, 0x7F, 0x3F, // 53 70 | 0xF0, 0xF8, 0x4C, 0x46, 0xC2, 0x82, 0x3F, 0x7F, 0x40, 0x40, 0x7F, 0x3F, // 54 71 | 0x02, 0x02, 0x02, 0xE2, 0xFE, 0x1E, 0x00, 0x00, 0x7F, 0x7F, 0x00, 0x00, // 55 72 | 0x7C, 0xFE, 0x82, 0x82, 0xFE, 0x7C, 0x3E, 0x7F, 0x41, 0x41, 0x7F, 0x3E, // 56 73 | 0xFC, 0xFE, 0x02, 0x02, 0xFE, 0xFC, 0x41, 0x43, 0x62, 0x32, 0x1F, 0x0F // 57 74 | 75 | }; 76 | 77 | #endif 78 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-1Panel/libraries/HJS589/fonts/ElektronMartArabic6x16.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * ElektronMartArabic6x16 4 | * 5 | * 6 | * File Name : ElektronMartArabic6x16.h 7 | * Date : 6 Sept 2019 8 | * Font width : 6 9 | * Font height : 16 10 | * Font first char : 32 11 | * Font last char : 127 12 | * Font used chars : 94 13 | * 14 | * The font data are defined as 15 | * 16 | * struct _FONT_ { 17 | * uint16_t font_Size_in_Bytes_over_all_included_Size_it_self; 18 | * uint8_t font_Width_in_Pixel_for_fixed_drawing; 19 | * uint8_t font_Height_in_Pixel_for_all_characters; 20 | * unit8_t font_First_Char; 21 | * uint8_t font_Char_Count; 22 | * 23 | * uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1]; 24 | * // for each character the separate width in pixels, 25 | * // characters < 128 have an implicit virtual right empty row 26 | * 27 | * uint8_t font_data[]; 28 | * // bit field of all characters 29 | */ 30 | 31 | #include 32 | #ifdef __AVR__ 33 | #include 34 | #elif defined (ESP8266) 35 | #include 36 | #else 37 | #define PROGMEM 38 | #endif 39 | 40 | #ifndef ELEKTRONMARTARABIC6x16_H 41 | #define ELEKTRONMARTARABIC6x16_H 42 | 43 | #define ELEKTRONMARTARABIC6x16_WIDTH 6 44 | #define ELEKTRONMARTARABIC6x16_HEIGHT 16 45 | 46 | const static uint8_t ElektronMartArabic6x16[] PROGMEM = { 47 | 0x03, 0xD0, // size // size of zero indicates fixed width font, actual length is width * height 48 | 0x06, // width 49 | 0x10, // height 50 | 0x30, // first char 51 | 0x0A, // char count 52 | 53 | 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 54 | 0x06, 0x06, 55 | 56 | // font data | 57 | 0x80, 0xc0, 0xe0, 0xe0, 0xc0, 0x80, 0x01, 0x03, 0x07, 0x07, 0x03, 0x01, //0 58 | 0x00, 0x00, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0x00, 0x00, //1 59 | 0xfe, 0xfe, 0x06, 0x06, 0x06, 0x04, 0x3f, 0x7f, 0x00, 0x00, 0x00, 0x00, //2 60 | 0xfe, 0xfe, 0x0c, 0x0e, 0x0c, 0x0e, 0x3f, 0x7f, 0x00, 0x00, 0x00, 0x00, //3 61 | 0xfe, 0xfe, 0xc6, 0xc6, 0xc6, 0x04, 0x3f, 0x7f, 0x60, 0x60, 0x60, 0x60, //4 62 | 0xc0, 0xf0, 0x3c, 0x0e, 0xfe, 0xfc, 0x3f, 0x7f, 0x60, 0x60, 0x7f, 0x7f, //5 63 | 0x06, 0x06, 0x06, 0x06, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f, //6 64 | 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfc, 0x1f, 0x3f, 0x70, 0x70, 0x3f, 0x1f, //7 65 | 0xf8, 0xfc, 0x0e, 0x0e, 0xfc, 0xf8, 0x3f, 0x7f, 0x00, 0x00, 0x7f, 0x7f, //8 66 | 0xfe, 0xfe, 0xc6, 0xc6, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f //9 67 | 68 | }; 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-2Panel/libraries/HJS589/fonts/ElektronMartArabic6x16.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * ElektronMartArabic6x16 4 | * 5 | * 6 | * File Name : ElektronMartArabic6x16.h 7 | * Date : 6 Sept 2019 8 | * Font width : 6 9 | * Font height : 16 10 | * Font first char : 32 11 | * Font last char : 127 12 | * Font used chars : 94 13 | * 14 | * The font data are defined as 15 | * 16 | * struct _FONT_ { 17 | * uint16_t font_Size_in_Bytes_over_all_included_Size_it_self; 18 | * uint8_t font_Width_in_Pixel_for_fixed_drawing; 19 | * uint8_t font_Height_in_Pixel_for_all_characters; 20 | * unit8_t font_First_Char; 21 | * uint8_t font_Char_Count; 22 | * 23 | * uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1]; 24 | * // for each character the separate width in pixels, 25 | * // characters < 128 have an implicit virtual right empty row 26 | * 27 | * uint8_t font_data[]; 28 | * // bit field of all characters 29 | */ 30 | 31 | #include 32 | #ifdef __AVR__ 33 | #include 34 | #elif defined (ESP8266) 35 | #include 36 | #else 37 | #define PROGMEM 38 | #endif 39 | 40 | #ifndef ELEKTRONMARTARABIC6x16_H 41 | #define ELEKTRONMARTARABIC6x16_H 42 | 43 | #define ELEKTRONMARTARABIC6x16_WIDTH 6 44 | #define ELEKTRONMARTARABIC6x16_HEIGHT 16 45 | 46 | const static uint8_t ElektronMartArabic6x16[] PROGMEM = { 47 | 0x03, 0xD0, // size // size of zero indicates fixed width font, actual length is width * height 48 | 0x06, // width 49 | 0x10, // height 50 | 0x30, // first char 51 | 0x0A, // char count 52 | 53 | 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 54 | 0x06, 0x06, 55 | 56 | // font data | 57 | 0x80, 0xc0, 0xe0, 0xe0, 0xc0, 0x80, 0x01, 0x03, 0x07, 0x07, 0x03, 0x01, //0 58 | 0x00, 0x00, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0x00, 0x00, //1 59 | 0xfe, 0xfe, 0x06, 0x06, 0x06, 0x04, 0x3f, 0x7f, 0x00, 0x00, 0x00, 0x00, //2 60 | 0xfe, 0xfe, 0x0c, 0x0e, 0x0c, 0x0e, 0x3f, 0x7f, 0x00, 0x00, 0x00, 0x00, //3 61 | 0xfe, 0xfe, 0xc6, 0xc6, 0xc6, 0x04, 0x3f, 0x7f, 0x60, 0x60, 0x60, 0x60, //4 62 | 0xc0, 0xf0, 0x3c, 0x0e, 0xfe, 0xfc, 0x3f, 0x7f, 0x60, 0x60, 0x7f, 0x7f, //5 63 | 0x06, 0x06, 0x06, 0x06, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f, //6 64 | 0xfe, 0xfe, 0x00, 0x00, 0xfe, 0xfc, 0x1f, 0x3f, 0x70, 0x70, 0x3f, 0x1f, //7 65 | 0xf8, 0xfc, 0x0e, 0x0e, 0xfc, 0xf8, 0x3f, 0x7f, 0x00, 0x00, 0x7f, 0x7f, //8 66 | 0xfe, 0xfe, 0xc6, 0xc6, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x7f //9 67 | 68 | }; 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-24/WebServer.h: -------------------------------------------------------------------------------- 1 | 2 | // WIFI 3 | 4 | // LED Internal 5 | uint8_t pin_led = 2; 6 | 7 | //WEB Server 8 | ESP8266WebServer server(80); 9 | ESP8266HTTPUpdateServer httpUpdater; 10 | 11 | // Sebagai Station 12 | const char* wifissid = "grobak.net"; //kalau gagal konek 13 | const char* wifipassword = ""; 14 | 15 | // Sebagai AccessPoint 16 | const char* ssid = "JWSP10"; //kalau gagal konek 17 | const char* password = "elektronmart"; 18 | 19 | IPAddress local_ip(192, 168, 4, 1); 20 | IPAddress gateway(192, 168, 4, 1); 21 | IPAddress netmask(255, 255, 255, 0); 22 | 23 | 24 | 25 | void wifiConnect() { 26 | 27 | WiFi.softAPdisconnect(true); 28 | WiFi.disconnect(); 29 | delay(1000); 30 | 31 | Serial.println("Mencoba sambungan ke Hotspot atau Router"); 32 | WiFi.mode(WIFI_STA); 33 | WiFi.begin(wifissid, wifipassword); 34 | 35 | unsigned long startTime = millis(); 36 | 37 | while (WiFi.status() != WL_CONNECTED) { 38 | 39 | delay(500); 40 | Serial.print("."); 41 | 42 | digitalWrite(pin_led, !digitalRead(pin_led)); 43 | 44 | if (millis() - startTime > 3000) { 45 | Serial.println(" "); 46 | break; 47 | } 48 | 49 | } 50 | 51 | if (WiFi.status() == WL_CONNECTED) { 52 | 53 | digitalWrite(pin_led, HIGH); 54 | Serial.print("MAC: "); 55 | Serial.println(WiFi.macAddress()); 56 | Serial.print("IP: "); 57 | Serial.println(WiFi.localIP()); 58 | 59 | } else { 60 | 61 | Serial.println("Gagal tersambung ke Hotspot, mode Hotspot aktif."); 62 | 63 | WiFi.mode(WIFI_AP); 64 | WiFi.softAPConfig(local_ip, gateway, netmask); 65 | WiFi.softAP(ssid, password); 66 | 67 | digitalWrite(pin_led, LOW); 68 | 69 | Serial.print("MAC: "); 70 | Serial.println(WiFi.macAddress()); 71 | Serial.print("IP: "); 72 | Serial.println(local_ip); 73 | 74 | } 75 | 76 | } 77 | 78 | 79 | 80 | void handleXMLWaktu(){ 81 | XMLWaktu(); 82 | server.send(200,"text/xml",XML); 83 | } 84 | 85 | void handleXMLDataJWS(){ 86 | XMLDataJWS(); 87 | server.send(200,"text/xml",XML); 88 | } 89 | 90 | 91 | void handleSettingJwsUpdate() { 92 | 93 | String datajws = server.arg("plain"); 94 | 95 | DynamicJsonDocument doc(1024); 96 | DeserializationError error = deserializeJson(doc, datajws); 97 | 98 | File configFileJws = LittleFS.open(fileconfigjws, "w"); 99 | 100 | if (!configFileJws) { 101 | Serial.println("Gagal membuka Info configFileJws untuk ditulis"); 102 | return; 103 | } 104 | 105 | serializeJson(doc, configFileJws); 106 | 107 | if (error) { 108 | 109 | Serial.print(F("deserializeJson() gagal kode sebagai berikut: ")); 110 | Serial.println(error.c_str()); 111 | return; 112 | 113 | } else { 114 | 115 | configFileJws.close(); 116 | Serial.println("Berhasil mengubah configFileJws"); 117 | 118 | loadJwsConfig(fileconfigjws, configjws); 119 | 120 | } 121 | 122 | } 123 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Arduino Project Grobak.Net 2 | 3 | ## JWS - Jadwal Waktu Sholat 4 | 5 | Jadwal Waktu Sholat menggunakan NodeMCU atau ESP8266, LED Panel P10, RTC DS3231 dan BUZZER 6 | 7 | ### FITUR 8 | 9 | - Jam Besar 10 | - Jadwal Sholat 5 Waktu dan Tanbih Imsak 11 | - Alarm Adzan Waktu Solat dan Tanbih Imsak 12 | - Tanggal 13 | - Suhu 14 | - Hitung Mundur Iqomah 15 | - Jam Kecil pada baris atas dan Update scroll teks malului Wifi pada baris bawah 16 | 17 | ### Hardware 18 | 19 | Controller JWS FullSet PCB ElektronMart JWSNodeMCUP10 Board v2.0 20 | - https://tokopedia.com/elektronmartcom/controller-jws-murottal-quad-multi-panel-wifi-mp3-jam-jadwal-sholat 21 | - https://www.bukalapak.com/p/elektronik/elektronik-lainnya/315l4pa-jual-controller-jws-murottal-quad-multi-panel-wifi-mp3-jam-jadwal-sholat-led-masjid 22 | 23 | LED Panel P10 24 | - https://www.tokopedia.com/elektronmartcom/led-display-panel-p10-smd-outdoor-green-hijau 25 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/2qkxq35-jual-led-display-panel-p10-smd-outdoor-green-hijau 26 | 27 | 28 | JWS KIT 29 | - https://tokopedia.com/elektronmartcom/jws-kit-controller-led-p10-hub12-mp3-murottal-jadwal-sholat-digital 30 | - https://www.bukalapak.com/p/elektronik/media-player-set-top-box/36buedq-jual-jws-kit-controller-led-p10-hub12-mp3-murottal-jadwal-sholat-digital 31 | 32 | 33 | PCB Only 34 | - https://tokopedia.com/elektronmartcom/pcb-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 35 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/2aiovn2-jual-pcb-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 36 | 37 | 38 | 39 | ### Pin on DMD LED P10 Panel 40 | 41 | | DMD P10 | GPIO | NODEMCU | 42 | | ------- | ---- | ------- | 43 | | A | GPIO16 | D0 | 44 | | B | GPIO12 | D6 | 45 | | CLK | GPIO14 | D5 | 46 | | SCK | GPIO0 | D3 | 47 | | R | GPIO13 | D7 | 48 | | NOE | GPIO15 | D8 | 49 | | GND | GND | GND | 50 | 51 | ### Pin on RTC DS3231 52 | 53 | | DS3231 | NODEMCU | 54 | | ------ | ------- | 55 | | SCL | D1 (GPIO 5) | 56 | | SDA | D2 (GPIO 4) | 57 | | VCC | 3V | 58 | | GND | GND | 59 | 60 | ### Pin on Buzzer 61 | 62 | | Buzzer | NODEMCU | 63 | | ------ | ------- | 64 | | + | RX (GPIO 3) | 65 | | - | GND | 66 | 67 | ### Eksternal Library 68 | - DMDESP : https://github.com/busel7/DMDESP 69 | - PrayerTime : https://github.com/asmaklad/Arduino-Prayer-Times 70 | - RTC DS3231 : https://github.com/Makuna/Rtc 71 | - ArduinoJson V6 : https://github.com/bblanchon/ArduinoJson 72 | - F1kM_Hisab : https://github.com/wardi1971/F1kM_Hisab 73 | 74 | Tools : 75 | - Desain bitmap dan font : http://dotmatrixtool.com 76 | - LittleFS Uploader : https://github.com/earlephilhower/arduino-esp8266littlefs-plugin/releases 77 | 78 | 79 | ### Catatan : 80 | - Perlu Power Eksternal 5V ke LED P10. 81 | - Saat Flashing (upload program) cabut sementara pin untuk buzzer. 82 | 83 | > email : bonny@grobak.net - www.grobak.net 84 | -------------------------------------------------------------------------------- /MembuatJWS/README.md: -------------------------------------------------------------------------------- 1 | # Arduino Project Grobak.Net 2 | 3 | ## PANDUAN MEMBUAT JWS - Jadwal Waktu Sholat 4 | 5 | Jadwal Waktu Sholat menggunakan NodeMCU atau ESP8266, LED Panel P10, RTC DS3231 dan BUZZER 6 | 7 | Youtube Channel Playlist : https://www.youtube.com/watch?v=lvVriKy26gw&list=PLKuQ-UWqAt3O8WmFeoTbUa2keQKbdOXVv 8 | 9 | ### FITUR 10 | 11 | - Jam Besar 12 | - Jadwal Sholat 5 Waktu dan Tanbih Imsak 13 | - Alarm Adzan Waktu Solat dan Tanbih Imsak 14 | - Tanggal Masehi dan Tanggal Hijriah 15 | - Suhu 16 | - Alarm Adzan 17 | - Hitung Mundur Iqomah 18 | - Tampilan Waktu Sholat 19 | - Running Text Nama Masjid 20 | 21 | ### Hardware 22 | 23 | JWS KIT 24 | - https://tokopedia.com/elektronmartcom/jws-kit-controller-led-p10-hub12-mp3-murottal-jadwal-sholat-digital 25 | - https://www.bukalapak.com/p/elektronik/media-player-set-top-box/36buedq-jual-jws-kit-controller-led-p10-hub12-mp3-murottal-jadwal-sholat-digital 26 | 27 | Controller JWS FullSet PCB ElektronMart JWSNodeMCUP10 Board v2.0 28 | - https://tokopedia.com/elektronmartcom/controller-jws-murottal-quad-multi-panel-wifi-mp3-jam-jadwal-sholat 29 | - https://www.bukalapak.com/p/elektronik/elektronik-lainnya/315l4pa-jual-controller-jws-murottal-quad-multi-panel-wifi-mp3-jam-jadwal-sholat-led-masjid 30 | 31 | LED Panel P10 32 | - https://www.tokopedia.com/elektronmartcom/led-display-panel-p10-smd-outdoor-green-hijau 33 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/2qkxq35-jual-led-display-panel-p10-smd-outdoor-green-hijau 34 | 35 | PCB Only 36 | - https://tokopedia.com/elektronmartcom/pcb-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 37 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/2aiovn2-jual-pcb-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 38 | 39 | 40 | 41 | ### Pin on DMD LED P10 Panel 42 | 43 | | DMD P10 | GPIO | NODEMCU | 44 | | ------- | ---- | ------- | 45 | | A | GPIO16 | D0 | 46 | | B | GPIO12 | D6 | 47 | | CLK | GPIO14 | D5 | 48 | | SCK | GPIO0 | D3 | 49 | | R | GPIO13 | D7 | 50 | | NOE | GPIO15 | D8 | 51 | | GND | GND | GND | 52 | 53 | ### Pin on RTC DS3231 54 | 55 | | DS3231 | NODEMCU | 56 | | ------ | ------- | 57 | | SCL | D1 (GPIO 5) | 58 | | SDA | D2 (GPIO 4) | 59 | | VCC | 3V | 60 | | GND | GND | 61 | 62 | ### Pin on Buzzer 63 | 64 | | Buzzer | NODEMCU | 65 | | ------ | ------- | 66 | | + | RX (GPIO 3) | 67 | | - | GND | 68 | 69 | ### Eksternal Library 70 | - DMDESP : https://github.com/busel7/DMDESP 71 | - PrayerTime : https://github.com/asmaklad/Arduino-Prayer-Times 72 | - RTC DS3231 : https://github.com/Makuna/Rtc 73 | - ArduinoJson V6 : https://github.com/bblanchon/ArduinoJson 74 | - F1kM_Hisab : https://github.com/wardi1971/F1kM_Hisab 75 | 76 | Tools : 77 | - Desain bitmap dan font : http://dotmatrixtool.com 78 | - LittleFS Uploader : https://github.com/earlephilhower/arduino-esp8266littlefs-plugin/releases 79 | 80 | 81 | ### Catatan : 82 | - Perlu Power Eksternal 5V ke LED P10. 83 | - Saat Flashing (upload program) cabut sementara pin untuk buzzer. 84 | 85 | > email : bonny@grobak.net - www.grobak.net 86 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-01/MembuatJWS-01.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * JADWAL WAKTU SHOLAT MENGGUNAKAN NODEMCU ESP8266, LED P10, RTC DS3231, BUZZER 3 | * FITUR : JADWAL SHOLAT 5 WAKTU DAN TANBIH IMSAK, JAM BESAR, TANGGAL, SUHU, ALARAM ADZAN DAN TANBIH IMSAK, 4 | * DAN HITUNG MUNDUR IQOMAH DAN UBAH WAKTU LEWAT WIFI DENGAN BROWSER. 5 | * 6 | 7 | Pin on DMD P10 GPIO NODEMCU Pin on DS3231 NODEMCU Pin on Buzzer NODEMCU 8 | 2 A GPIO16 D0 SCL D1 (GPIO 5) + RX (GPIO 3) 9 | 4 B GPIO12 D6 SDA D2 (GPIO 4) - GND 10 | 8 CLK GPIO14 D5 VCC 3V 11 | 10 SCK GPIO0 D3 GND GND 12 | 12 R GPIO13 D7 13 | 1 NOE GPIO15 D8 14 | 3 GND GND GND 15 | 16 | Catatan : 17 | o Perlu Power Eksternal 5V ke LED P10. 18 | o Saat Flashing (upload program) cabut sementara pin untuk buzzer. 19 | 20 | Project Git 21 | - https://github.com/busel7/Arduino 22 | 23 | Eksternal Library 24 | - HJS589(DMD3 porting for ESP8266 by Ahmad Herman) 25 | < DMD3 by Azis Kurosaki 26 | < DMD2(https://github.com/freetronics/DMD2) 27 | < DMD (https://github.com/freetronics/DMD) 28 | - PrayerTime : https://github.com/asmaklad/Arduino-Prayer-Times 29 | - RTC DS3231 : https://github.com/Makuna/Rtc 30 | - ArduinoJson V6 : https://github.com/bblanchon/ArduinoJson 31 | 32 | Diskusi Grup Untuk1000Masjid : https://www.facebook.com/groups/761058907424496/ 33 | 34 | www.grobak.net - www.elektronmart.com 35 | 36 | Updated : 24 September 2019 37 | */ 38 | 39 | 40 | #include 41 | 42 | #include 43 | #include 44 | #include 45 | #include 46 | #include 47 | 48 | 49 | //---------------------------- 50 | // SETUP DMD HJS589 51 | 52 | #define DISPLAYS_WIDE 2 53 | #define DISPLAYS_HIGH 1 54 | HJS589 Disp(DISPLAYS_WIDE, DISPLAYS_HIGH); // Jumlah Panel P10 yang digunakan (KOLOM,BARIS) 55 | 56 | 57 | 58 | //---------------------------------------------------------------------- 59 | // HJS589 P10 FUNGSI TAMBAHAN UNTUK NODEMCU ESP8266 60 | 61 | void ICACHE_RAM_ATTR refresh() { 62 | 63 | Disp.refresh(); 64 | timer0_write(ESP.getCycleCount() + 80000); 65 | 66 | } 67 | 68 | void Disp_init() { 69 | 70 | Disp.start(); 71 | noInterrupts(); 72 | timer0_isr_init(); 73 | timer0_attachInterrupt(refresh); 74 | timer0_write(ESP.getCycleCount() + 80000); 75 | interrupts(); 76 | Disp.clear(); 77 | 78 | } 79 | 80 | 81 | 82 | //---------------------------------------------------------------------- 83 | // SETUP 84 | 85 | void setup() { 86 | 87 | Serial.begin(9600); 88 | 89 | //DMD 90 | Disp_init(); 91 | 92 | Disp.setBrightness(20); 93 | 94 | 95 | } 96 | 97 | 98 | 99 | 100 | //---------------------------------------------------------------------- 101 | // LOOP 102 | 103 | 104 | void loop() { 105 | 106 | Disp.setFont(ElektronMart5x6); 107 | Disp.drawText(1,0, "MEMBUAT JWS"); 108 | Disp.drawText(1,7, "#01"); 109 | delay(3000); 110 | Disp.clear(); 111 | 112 | } 113 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-1Panel/Readme.md: -------------------------------------------------------------------------------- 1 | # Arduino Project Grobak.Net 2 | 3 | ## LED JWS - Jam Waktu Sholat 4 | 5 | JWSP10 NodeMCU ESP8266 7 | 8 | Jam Waktu Sholat menggunakan: 9 | 10 | FullSet PCB ElektronMart JWSNodeMCUP10 Board v2.0 11 | - https://www.tokopedia.com/elektronmartcom/pcb-full-set-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 12 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/2cqmkgd-jual-pcb-full-set-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 13 | 14 | PCB ElektronMart JWSNodeMCUP10 Board v2.0 15 | - https://www.tokopedia.com/elektronmartcom/pcb-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 16 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/2aiovn2-jual-pcb-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 17 | 18 | NodeMCU ESP8266 19 | - https://www.tokopedia.com/elektronmartcom/nodemcu-esp8266-v3-lua-wifi-board-ch340 20 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1lpt86t-jual-nodemcu-esp8266-v3-lua-wifi-board-ch340 21 | 22 | LED Panel P10 23 | 24 | RTC DS3231 25 | - https://www.tokopedia.com/elektronmartcom/rtc-ds3231-at24c32-iic-precision-clock-module-ds3231sn-without-battery 26 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1flsmxn-jual-rtc-ds3231sn-at24c32-iic-precision-clock-module-without-battery 27 | 28 | Buzzer 29 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1fo3u1t-jual-piezo-active-buzzer-5v 30 | - https://www.tokopedia.com/elektronmartcom/piezo-active-buzzer-5v 31 | 32 | ### FITUR 33 | 34 | - Jam Besar 35 | - Jadwal Sholat 5 Waktu dan Tanbih Imsak 36 | - Alarm Adzan 5 Waktu Solat dan Tanbih Imsak 37 | - Tanggal 38 | - Suhu 39 | - Hitung Mundur Iqomah 40 | - Setting Waktu lewat Wifi dengan browser 41 | - Setting Display tingkat kecerahan 42 | 43 | ### Pin on DMD LED P10 Panel 44 | 45 | | DMD P10 | NODEMCU | 46 | | ------- | ------- | 47 | | A | D0 | 48 | | B | D6 | 49 | | CLK | D5 | 50 | | SCK | D3 | 51 | | R | D7 | 52 | | NOE | D8 | 53 | | GND | GND | 54 | 55 | ### Pin on RTC DS3231 56 | 57 | | DS3231 | NODEMCU | 58 | | ------ | ------- | 59 | | SCL | D1 | 60 | | SDA | D2 | 61 | | VCC | 3V | 62 | | GND | GND | 63 | 64 | ### Pin on Buzzer 65 | 66 | | Buzzer | NODEMCU | 67 | | ------ | ------- | 68 | | + | RX | 69 | | - | GND | 70 | 71 | ### Eksternal Library 72 | - HJS589(DMD3 porting for ESP8266 by Ahmad Herman) < DMD3 by Wardi Utari @ MFH Robotic (info https://www.facebook.com/MFH.Robotic/)) < DMD : https://github.com/freetronics/DMD 73 | - PrayerTime : https://github.com/asmaklad/Arduino-Prayer-Times 74 | - RTC DS3231 : https://github.com/Makuna/Rtc 75 | - ArduinoJson V6 : https://github.com/bblanchon/ArduinoJson 76 | 77 | ### Setting Jam dan Waktu Sholat 78 | 1. Sambungkan Wifi Handphone atau Laptop ke SSID : JWSP10 79 | 2. Dengan Password : elektronmart 80 | 3. Buka browser misalnya Chrome 81 | 4. Masukkan alamat http://192.168.4.1 82 | 83 | 84 | ### Catatan : 85 | - Perlu Power Eksternal 5V ke LED P10. 86 | - Saat Flashing (upload program) cabut sementara pin untuk buzzer. 87 | 88 | > email : bonny@grobak.net - www.grobak.net - www.elektronmart.com 89 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-2Panel/Readme.md: -------------------------------------------------------------------------------- 1 | # Arduino Project Grobak.Net 2 | 3 | ## LED JWS 2 Panel - Jam Waktu Sholat 4 | 5 | Jam Waktu Sholat JWS 2 Panel LED Clock Prayer Times NodeMCU ESP8266 DMD P10 Arduino Web Config V3 7 | 8 | Jam Waktu Sholat menggunakan: 9 | 10 | FullSet PCB ElektronMart JWSNodeMCUP10 Board v2.0 11 | - https://www.tokopedia.com/elektronmartcom/pcb-full-set-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 12 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/2cqmkgd-jual-pcb-full-set-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 13 | 14 | PCB ElektronMart JWSNodeMCUP10 Board v2.0 15 | - https://www.tokopedia.com/elektronmartcom/pcb-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 16 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/2aiovn2-jual-pcb-jws-nodemcu-board-2-0-elektronmart-led-p10-arduino 17 | 18 | NodeMCU ESP8266 19 | - https://www.tokopedia.com/elektronmartcom/nodemcu-esp8266-v3-lua-wifi-board-ch340 20 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1lpt86t-jual-nodemcu-esp8266-v3-lua-wifi-board-ch340 21 | 22 | LED Panel P10 23 | 24 | RTC DS3231 25 | - https://www.tokopedia.com/elektronmartcom/rtc-ds3231-at24c32-iic-precision-clock-module-ds3231sn-without-battery 26 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1flsmxn-jual-rtc-ds3231sn-at24c32-iic-precision-clock-module-without-battery 27 | 28 | Buzzer 29 | - https://www.bukalapak.com/p/elektronik/komponen-elektronik/1fo3u1t-jual-piezo-active-buzzer-5v 30 | - https://www.tokopedia.com/elektronmartcom/piezo-active-buzzer-5v 31 | 32 | ### FITUR 33 | 34 | - Jam Besar 35 | - Jadwal Sholat 5 Waktu dan Tanbih Imsak 36 | - Alarm Adzan 5 Waktu Solat dan Tanbih Imsak 37 | - Tanggal 38 | - Suhu 39 | - Hitung Mundur Iqomah 40 | - Setting Waktu lewat Wifi dengan browser 41 | - Setting Display tingkat kecerahan 42 | 43 | ### Pin on DMD LED P10 Panel 44 | 45 | | DMD P10 | NODEMCU | 46 | | ------- | ------- | 47 | | A | D0 | 48 | | B | D6 | 49 | | CLK | D5 | 50 | | SCK | D3 | 51 | | R | D7 | 52 | | NOE | D8 | 53 | | GND | GND | 54 | 55 | ### Pin on RTC DS3231 56 | 57 | | DS3231 | NODEMCU | 58 | | ------ | ------- | 59 | | SCL | D1 | 60 | | SDA | D2 | 61 | | VCC | 3V | 62 | | GND | GND | 63 | 64 | ### Pin on Buzzer 65 | 66 | | Buzzer | NODEMCU | 67 | | ------ | ------- | 68 | | + | RX | 69 | | - | GND | 70 | 71 | ### Eksternal Library 72 | - HJS589(DMD3 porting for ESP8266 by Ahmad Herman) < DMD3 by Wardi Utari @ MFH Robotic (info https://www.facebook.com/MFH.Robotic/)) < DMD : https://github.com/freetronics/DMD 73 | - PrayerTime : https://github.com/asmaklad/Arduino-Prayer-Times 74 | - RTC DS3231 : https://github.com/Makuna/Rtc 75 | - ArduinoJson V6 : https://github.com/bblanchon/ArduinoJson 76 | 77 | ### Setting Jam dan Waktu Sholat 78 | 1. Sambungkan Wifi Handphone atau Laptop ke SSID : JWSP10 79 | 2. Dengan Password : elektronmart 80 | 3. Buka browser misalnya Chrome 81 | 4. Masukkan alamat http://192.168.4.1 82 | 83 | 84 | ### Catatan : 85 | - Perlu Power Eksternal 5V ke LED P10. 86 | - Saat Flashing (upload program) cabut sementara pin untuk buzzer. 87 | 88 | > email : bonny@grobak.net - www.grobak.net - www.elektronmart.com 89 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-MAX7219/PrayerTimes.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef Morse_h 4 | #define Morse_h 5 | 6 | #include "Arduino.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | static const int NUM_ITERATIONS = 1; // number of iterations needed to compute times 14 | 15 | /* ------------------------------------------------------------------------------------------------- */ 16 | static const char* TimeName[] = 17 | { 18 | "Fajr", 19 | "Sunrise", 20 | "Dhuhr", 21 | "Asr", 22 | "Sunset", 23 | "Maghrib", 24 | "Isha", 25 | "TimesCount" 26 | }; 27 | // Calculation Methods 28 | enum CalculationMethod 29 | { 30 | Jafari, // Ithna Ashari 31 | Karachi, // University of Islamic Sciences, Karachi 32 | ISNA, // Islamic Society of North America (ISNA) 33 | MWL, // Muslim World League (MWL) 34 | Makkah, // Umm al-Qura, Makkah 35 | Egypt, // Egyptian General Authority of Survey 36 | Custom, // Custom Setting 37 | 38 | CalculationMethodsCount 39 | }; 40 | 41 | // Juristic Methods 42 | enum JuristicMethod 43 | { 44 | Shafii, // Shafii (standard) 45 | Hanafi, // Hanafi 46 | }; 47 | 48 | // Adjusting Methods for Higher Latitudes 49 | enum AdjustingMethod 50 | { 51 | None, // No adjustment 52 | MidNight, // middle of night 53 | OneSeventh, // 1/7th of night 54 | AngleBased, // angle/60th of night 55 | }; 56 | 57 | // Time IDs 58 | enum TimeID 59 | { 60 | Fajr, 61 | Sunrise, 62 | Dhuhr, 63 | Asr, 64 | Sunset, 65 | Maghrib, 66 | Isha, 67 | TimesCount 68 | }; 69 | 70 | struct MethodConfig 71 | { 72 | MethodConfig() 73 | { 74 | } 75 | 76 | MethodConfig(double fajr_angle, 77 | bool maghrib_is_minutes, 78 | double maghrib_value, 79 | bool isha_is_minutes, 80 | double isha_value) 81 | : fajr_angle(fajr_angle) 82 | , maghrib_is_minutes(maghrib_is_minutes) 83 | , maghrib_value(maghrib_value) 84 | , isha_is_minutes(isha_is_minutes) 85 | , isha_value(isha_value) 86 | { 87 | } 88 | 89 | double fajr_angle; 90 | bool maghrib_is_minutes; 91 | double maghrib_value; // angle or minutes 92 | bool isha_is_minutes; 93 | double isha_value; // angle or minutes 94 | }; 95 | 96 | struct DoublePair { 97 | double first; 98 | double second; 99 | }; 100 | 101 | 102 | void compute_times(double times[]); 103 | void adjust_times(double times[]); 104 | void day_portion(double times[]); 105 | void set_calc_method(CalculationMethod method_id); 106 | void adjust_high_lat_times(double times[]); 107 | void set_asr_method(JuristicMethod method_id); 108 | void set_high_lats_adjust_method(AdjustingMethod method_id); 109 | void set_calc_method(CalculationMethod method_id); 110 | void set_fajr_angle(double angle); 111 | void set_maghrib_angle(double angle); 112 | void set_isha_angle(double angle); 113 | 114 | double compute_time(double g, double t); 115 | double sun_declination(double jd); 116 | double compute_mid_day(double _t); 117 | double equation_of_time(double jd); 118 | double night_portion(double angle); 119 | 120 | static double fix_angle(double a); 121 | static double deg2rad(double d); 122 | static double rad2deg(double r); 123 | static String int_to_string(int num); 124 | 125 | void get_prayer_times(int year, int month, int day, double _latitude, double _longitude, double _timezone, double times[]); 126 | void get_float_time_parts(double time, int& hours, int& minutes); 127 | 128 | #endif 129 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-1Panel/PrayerTimes.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef Morse_h 4 | #define Morse_h 5 | 6 | #include "Arduino.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | static const int NUM_ITERATIONS = 1; // number of iterations needed to compute times 14 | 15 | /* ------------------------------------------------------------------------------------------------- */ 16 | static const char* TimeName[] = 17 | { 18 | "Fajr", 19 | "Sunrise", 20 | "Dhuhr", 21 | "Asr", 22 | "Sunset", 23 | "Maghrib", 24 | "Isha", 25 | "TimesCount" 26 | }; 27 | // Calculation Methods 28 | enum CalculationMethod 29 | { 30 | Jafari, // Ithna Ashari 31 | Karachi, // University of Islamic Sciences, Karachi 32 | ISNA, // Islamic Society of North America (ISNA) 33 | MWL, // Muslim World League (MWL) 34 | Makkah, // Umm al-Qura, Makkah 35 | Egypt, // Egyptian General Authority of Survey 36 | Custom, // Custom Setting 37 | 38 | CalculationMethodsCount 39 | }; 40 | 41 | // Juristic Methods 42 | enum JuristicMethod 43 | { 44 | Shafii, // Shafii (standard) 45 | Hanafi, // Hanafi 46 | }; 47 | 48 | // Adjusting Methods for Higher Latitudes 49 | enum AdjustingMethod 50 | { 51 | None, // No adjustment 52 | MidNight, // middle of night 53 | OneSeventh, // 1/7th of night 54 | AngleBased, // angle/60th of night 55 | }; 56 | 57 | // Time IDs 58 | enum TimeID 59 | { 60 | Fajr, 61 | Sunrise, 62 | Dhuhr, 63 | Asr, 64 | Sunset, 65 | Maghrib, 66 | Isha, 67 | TimesCount 68 | }; 69 | 70 | struct MethodConfig 71 | { 72 | MethodConfig() 73 | { 74 | } 75 | 76 | MethodConfig(double fajr_angle, 77 | bool maghrib_is_minutes, 78 | double maghrib_value, 79 | bool isha_is_minutes, 80 | double isha_value) 81 | : fajr_angle(fajr_angle) 82 | , maghrib_is_minutes(maghrib_is_minutes) 83 | , maghrib_value(maghrib_value) 84 | , isha_is_minutes(isha_is_minutes) 85 | , isha_value(isha_value) 86 | { 87 | } 88 | 89 | double fajr_angle; 90 | bool maghrib_is_minutes; 91 | double maghrib_value; // angle or minutes 92 | bool isha_is_minutes; 93 | double isha_value; // angle or minutes 94 | }; 95 | 96 | struct DoublePair { 97 | double first; 98 | double second; 99 | }; 100 | 101 | 102 | void compute_times(double times[]); 103 | void adjust_times(double times[]); 104 | void day_portion(double times[]); 105 | void set_calc_method(CalculationMethod method_id); 106 | void adjust_high_lat_times(double times[]); 107 | void set_asr_method(JuristicMethod method_id); 108 | void set_high_lats_adjust_method(AdjustingMethod method_id); 109 | void set_calc_method(CalculationMethod method_id); 110 | void set_fajr_angle(double angle); 111 | void set_maghrib_angle(double angle); 112 | void set_isha_angle(double angle); 113 | 114 | double compute_time(double g, double t); 115 | double sun_declination(double jd); 116 | double compute_mid_day(double _t); 117 | double equation_of_time(double jd); 118 | double night_portion(double angle); 119 | 120 | static double fix_angle(double a); 121 | static double deg2rad(double d); 122 | static double rad2deg(double r); 123 | static String int_to_string(int num); 124 | 125 | void get_prayer_times(int year, int month, int day, double _latitude, double _longitude, double _timezone, double times[]); 126 | void get_float_time_parts(double time, int& hours, int& minutes); 127 | 128 | #endif 129 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-2Panel/PrayerTimes.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef Morse_h 4 | #define Morse_h 5 | 6 | #include "Arduino.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | static const int NUM_ITERATIONS = 1; // number of iterations needed to compute times 14 | 15 | /* ------------------------------------------------------------------------------------------------- */ 16 | static const char* TimeName[] = 17 | { 18 | "Fajr", 19 | "Sunrise", 20 | "Dhuhr", 21 | "Asr", 22 | "Sunset", 23 | "Maghrib", 24 | "Isha", 25 | "TimesCount" 26 | }; 27 | // Calculation Methods 28 | enum CalculationMethod 29 | { 30 | Jafari, // Ithna Ashari 31 | Karachi, // University of Islamic Sciences, Karachi 32 | ISNA, // Islamic Society of North America (ISNA) 33 | MWL, // Muslim World League (MWL) 34 | Makkah, // Umm al-Qura, Makkah 35 | Egypt, // Egyptian General Authority of Survey 36 | Custom, // Custom Setting 37 | 38 | CalculationMethodsCount 39 | }; 40 | 41 | // Juristic Methods 42 | enum JuristicMethod 43 | { 44 | Shafii, // Shafii (standard) 45 | Hanafi, // Hanafi 46 | }; 47 | 48 | // Adjusting Methods for Higher Latitudes 49 | enum AdjustingMethod 50 | { 51 | None, // No adjustment 52 | MidNight, // middle of night 53 | OneSeventh, // 1/7th of night 54 | AngleBased, // angle/60th of night 55 | }; 56 | 57 | // Time IDs 58 | enum TimeID 59 | { 60 | Fajr, 61 | Sunrise, 62 | Dhuhr, 63 | Asr, 64 | Sunset, 65 | Maghrib, 66 | Isha, 67 | TimesCount 68 | }; 69 | 70 | struct MethodConfig 71 | { 72 | MethodConfig() 73 | { 74 | } 75 | 76 | MethodConfig(double fajr_angle, 77 | bool maghrib_is_minutes, 78 | double maghrib_value, 79 | bool isha_is_minutes, 80 | double isha_value) 81 | : fajr_angle(fajr_angle) 82 | , maghrib_is_minutes(maghrib_is_minutes) 83 | , maghrib_value(maghrib_value) 84 | , isha_is_minutes(isha_is_minutes) 85 | , isha_value(isha_value) 86 | { 87 | } 88 | 89 | double fajr_angle; 90 | bool maghrib_is_minutes; 91 | double maghrib_value; // angle or minutes 92 | bool isha_is_minutes; 93 | double isha_value; // angle or minutes 94 | }; 95 | 96 | struct DoublePair { 97 | double first; 98 | double second; 99 | }; 100 | 101 | 102 | void compute_times(double times[]); 103 | void adjust_times(double times[]); 104 | void day_portion(double times[]); 105 | void set_calc_method(CalculationMethod method_id); 106 | void adjust_high_lat_times(double times[]); 107 | void set_asr_method(JuristicMethod method_id); 108 | void set_high_lats_adjust_method(AdjustingMethod method_id); 109 | void set_calc_method(CalculationMethod method_id); 110 | void set_fajr_angle(double angle); 111 | void set_maghrib_angle(double angle); 112 | void set_isha_angle(double angle); 113 | 114 | double compute_time(double g, double t); 115 | double sun_declination(double jd); 116 | double compute_mid_day(double _t); 117 | double equation_of_time(double jd); 118 | double night_portion(double angle); 119 | 120 | static double fix_angle(double a); 121 | static double deg2rad(double d); 122 | static double rad2deg(double r); 123 | static String int_to_string(int num); 124 | 125 | void get_prayer_times(int year, int month, int day, double _latitude, double _longitude, double _timezone, double times[]); 126 | void get_float_time_parts(double time, int& hours, int& minutes); 127 | 128 | #endif 129 | -------------------------------------------------------------------------------- /ArduinoNano/JadwalSholat-P10-1Panel/PrayerTimes.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef Morse_h 4 | #define Morse_h 5 | 6 | #include "Arduino.h" 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | 13 | static const int NUM_ITERATIONS = 1; // number of iterations needed to compute times 14 | 15 | /* ------------------------------------------------------------------------------------------------- */ 16 | static const char* TimeName[] = 17 | { 18 | "Subuh", 19 | "Sunrise", 20 | "Dhuhur", 21 | "Ashar", 22 | "Sunset", 23 | "Maghrib", 24 | "Isya", 25 | "TimesCount" 26 | }; 27 | // Calculation Methods 28 | enum CalculationMethod 29 | { 30 | Jafari, // Ithna Ashari 31 | Karachi, // University of Islamic Sciences, Karachi 32 | ISNA, // Islamic Society of North America (ISNA) 33 | MWL, // Muslim World League (MWL) 34 | Makkah, // Umm al-Qura, Makkah 35 | Egypt, // Egyptian General Authority of Survey 36 | Custom, // Custom Setting 37 | 38 | CalculationMethodsCount 39 | }; 40 | 41 | // Juristic Methods 42 | enum JuristicMethod 43 | { 44 | Shafii, // Shafii (standard) 45 | Hanafi, // Hanafi 46 | }; 47 | 48 | // Adjusting Methods for Higher Latitudes 49 | enum AdjustingMethod 50 | { 51 | None, // No adjustment 52 | MidNight, // middle of night 53 | OneSeventh, // 1/7th of night 54 | AngleBased, // angle/60th of night 55 | }; 56 | 57 | // Time IDs 58 | enum TimeID 59 | { 60 | Subuh, 61 | Sunrise, 62 | Dhuhur, 63 | Ashar, 64 | Sunset, 65 | Maghrib, 66 | Isya, 67 | TimesCount 68 | }; 69 | 70 | struct MethodConfig 71 | { 72 | MethodConfig() 73 | { 74 | } 75 | 76 | MethodConfig(double fajr_angle, 77 | bool maghrib_is_minutes, 78 | double maghrib_value, 79 | bool isha_is_minutes, 80 | double isha_value) 81 | : fajr_angle(fajr_angle) 82 | , maghrib_is_minutes(maghrib_is_minutes) 83 | , maghrib_value(maghrib_value) 84 | , isha_is_minutes(isha_is_minutes) 85 | , isha_value(isha_value) 86 | { 87 | } 88 | 89 | double fajr_angle; 90 | bool maghrib_is_minutes; 91 | double maghrib_value; // angle or minutes 92 | bool isha_is_minutes; 93 | double isha_value; // angle or minutes 94 | }; 95 | 96 | struct DoublePair { 97 | double first; 98 | double second; 99 | }; 100 | 101 | 102 | void compute_times(double times[]); 103 | void adjust_times(double times[]); 104 | void day_portion(double times[]); 105 | void set_calc_method(CalculationMethod method_id); 106 | void adjust_high_lat_times(double times[]); 107 | void set_asr_method(JuristicMethod method_id); 108 | void set_high_lats_adjust_method(AdjustingMethod method_id); 109 | void set_calc_method(CalculationMethod method_id); 110 | void set_fajr_angle(double angle); 111 | void set_maghrib_angle(double angle); 112 | void set_isha_angle(double angle); 113 | 114 | double compute_time(double g, double t); 115 | double sun_declination(double jd); 116 | double compute_mid_day(double _t); 117 | double equation_of_time(double jd); 118 | double night_portion(double angle); 119 | 120 | static double fix_angle(double a); 121 | static double deg2rad(double d); 122 | static double rad2deg(double r); 123 | static String int_to_string(int num); 124 | 125 | void get_prayer_times(int year, int month, int day, double _latitude, double _longitude, double _timezone, double times[]); 126 | void get_float_time_parts(double time, int& hours, int& minutes); 127 | 128 | #endif 129 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-15/WebPage.h: -------------------------------------------------------------------------------- 1 | String message, XML; 2 | 3 | 4 | char setwaktu[] PROGMEM = R"=====( 5 | 6 | 7 | 8 | 9 | 10 | 11 | JWSP10 ELEKTRONMART 12 | 13 | 14 | 15 | 16 | 17 |

Ubah Waktu

18 | 19 | 20 | 21 | 28 | 35 | 36 |
22 |
23 |

Tanggal

24 |

25 | 26 |
27 |
29 |
30 |

Jam

31 |

32 | 33 |
34 |
37 |

38 | ElektronMart.Com


39 | Bukalapak 40 | Tokopedia
41 | 42 | 43 | 44 | 45 | 103 | 104 | 105 | 106 | 107 | )====="; 108 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-16/WebPage.h: -------------------------------------------------------------------------------- 1 | String message, XML; 2 | 3 | 4 | char setwaktu[] PROGMEM = R"=====( 5 | 6 | 7 | 8 | 9 | 10 | 11 | JWSP10 ELEKTRONMART 12 | 13 | 14 | 15 | 16 | 17 |

Ubah Waktu

18 |
19 | // 20 | :: 21 | C

22 |
23 | 24 | 25 | 32 | 39 | 40 |
26 |
27 |

Tanggal

28 |

29 | 30 |
31 |
33 |
34 |

Jam

35 |

36 | 37 |
38 |
41 |

42 | ElektronMart.Com


43 | Bukalapak 44 | Tokopedia
45 | 46 | 47 | 48 | 49 | 107 | 108 | 109 | 110 | 111 | )====="; 112 | -------------------------------------------------------------------------------- /NodeMCU/P10SC-ESP32-RTC.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Demo P10 Single Color HUB12 menggunakan NodeMCU 32S ESP32S (Yellow Pin) dan RTC DS3231 3 | 4 | 5 | WIRING 6 | ------ 7 | 8 | P10 ESP32 9 | A 5 10 | B 18 11 | C 19 12 | CLK 22 13 | LAT/SCLK 26 14 | R 2 15 | OE 25 16 | GND GND 17 | 18 | RTC 19 | --- 20 | SDA 32 21 | SCL 33 22 | 23 | 24 | Bonny Useful (ElektronMart.Com) 25 | 26 | Board : 27 | o ESP32 1.0.6 - Espressif System 28 | 29 | Library : 30 | o SmartMatrix 4.0.3 - Louis Beaudoin (Pixelmatix) - https://github.com/pixelmatix/SmartMatrix/tree/teensylc 31 | o RTC - Makuna - https://github.com/Makuna/Rtc 32 | 33 | PCB : 34 | o https://www.tokopedia.com/elektronmartcom/pcb-controller-led-rgb-nodemcu-esp-32-esp32-smartmatrix-arduino 35 | o https://www.bukalapak.com/p/elektronik/elektronik-lainnya/35vq5s0-jual-pcb-controller-led-rgb-nodemcu-esp-32-esp32-smartmatrix-arduino-elektronmart 36 | o https://shopee.co.id/PCB-Controller-LED-RGB-NodeMCU-ESP-32-ESP32-SmartMatrix-Arduino-ElektronMart-i.139057740.4635178639 37 | 38 | Updated : 27 Agustus 2024 39 | 40 | */ 41 | 42 | #include 43 | #include 44 | RtcDS3231 Rtc(Wire); 45 | 46 | #include 47 | #include 48 | 49 | #define COLOR_DEPTH 24 // known working: 24, 48 - If the sketch uses type `rgb24` directly, COLOR_DEPTH must be 24 50 | const uint8_t kMatrixWidth = 32; // known working: 32, 64, 96, 128 51 | const uint8_t kMatrixHeight = 32*2; // known working: 32 (untuk 1 baris), 64 (untuk 2 baris) 52 | const uint8_t kRefreshDepth = 24; // known working: 24, 36, 48 53 | const uint8_t kDmaBufferRows = 2; // known working: 2-4, use 2 to save memory, more to keep from dropping frames and automatically lowering refresh rate 54 | const uint8_t kPanelType = SMARTMATRIX_HUB12_16ROW_32COL_MOD4SCAN; // use SMARTMATRIX_HUB75_16ROW_MOD8SCAN for common 16x32 panels 55 | const uint8_t kMatrixOptions = (SMARTMATRIX_OPTIONS_HUB12_MODE); // see http://docs.pixelmatix.com/SmartMatrix for options 56 | const uint8_t kIndexedLayerOptions = (SMARTMATRIX_OPTIONS_HUB12_MODE); 57 | 58 | SMARTMATRIX_ALLOCATE_BUFFERS(matrix, kMatrixWidth, kMatrixHeight, kRefreshDepth, kDmaBufferRows, kPanelType, kMatrixOptions); 59 | SMARTMATRIX_ALLOCATE_INDEXED_LAYER(indexedLayer, kMatrixWidth, kMatrixHeight, COLOR_DEPTH, kIndexedLayerOptions); 60 | 61 | const int defaultBrightness = (25*255)/100; // full (100%) brightness 62 | //const int defaultBrightness = (15*255)/100; // dim: 15% brightness 63 | const int defaultScrollOffset = 6; 64 | const rgb24 defaultBackgroundColor = {0, 0, 0}; 65 | 66 | 67 | RtcDateTime now; 68 | 69 | void setup() { 70 | 71 | Serial.begin(115200); 72 | 73 | // setup matrix 74 | matrix.addLayer(&indexedLayer); 75 | matrix.begin(); 76 | 77 | Wire.begin(32,33); 78 | Rtc.Begin(); 79 | 80 | if (!Rtc.GetIsRunning()) { 81 | 82 | Rtc.SetIsRunning(true); 83 | 84 | } 85 | 86 | Rtc.Enable32kHzPin(false); 87 | Rtc.SetSquareWavePin(DS3231SquareWavePin_ModeNone); 88 | 89 | matrix.setBrightness(defaultBrightness); 90 | } 91 | 92 | void loop() { 93 | 94 | RtcDateTime now = Rtc.GetDateTime(); 95 | 96 | char jam[9]; 97 | char tanggal[9]; 98 | 99 | // clear screen before writing new text 100 | indexedLayer.fillScreen(0); 101 | 102 | /* Draw Clock to SmartMatrix */ 103 | uint8_t hour = now.Hour(); 104 | sprintf(jam, "%02d:%02d:%02d", hour, now.Minute(), now.Second()); 105 | sprintf(tanggal, "%02d-%02d-%02d", now.Day(), now.Month(), now.Year()-2000); 106 | indexedLayer.setFont(font3x5); 107 | 108 | //Panel 1 Kiri atau Atas 109 | indexedLayer.drawString(0, 1, 1, jam); 110 | indexedLayer.drawString(0, 10, 1, tanggal); 111 | 112 | //Panel 2 Kanan 113 | indexedLayer.drawString(32, 1, 1, "LED PKA"); // Tes Horizontal 114 | indexedLayer.drawString(32, 10, 1, "LED PKB"); // Tes Horizontal 115 | 116 | //Panel 2 Bawah 117 | indexedLayer.drawString(0, 33, 1, "LED PBA"); // Tes Vertikal 118 | indexedLayer.drawString(0, 42, 1, "LED PBB"); // Tes Vertikal 119 | 120 | indexedLayer.swapBuffers(); 121 | delay(1000); 122 | 123 | } 124 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-17/RTC.h: -------------------------------------------------------------------------------- 1 | //SETUP RTC 2 | //year, month, date, hour, min, sec and week-day(Senin 0 sampai Ahad 6) 3 | //DateTime dt(2018, 12, 20, 16, 30, 0, 3); 4 | RtcDateTime now; 5 | char weekDay[][7] = {"AHAD", "SENIN", "SELASA", "RABU", "KAMIS", "JUM'AT", "SABTU", "AHAD"}; // array hari, dihitung mulai dari senin, hari senin angka nya =0, 6 | char monthYear[][4] = { "DES", "JAN", "FEB", "MAR", "APR", "MEI", "JUN", "JUL", "AGU", "SEP", "OKT", "NOV", "DES" }; 7 | 8 | 9 | 10 | //---------------------------------------------------------------------- 11 | // I2C_ClearBus menghindari gagal baca RTC (nilai 00 atau 165) 12 | 13 | int I2C_ClearBus() { 14 | 15 | #if defined(TWCR) && defined(TWEN) 16 | TWCR &= ~(_BV(TWEN)); //Disable the Atmel 2-Wire interface so we can control the SDA and SCL pins directly 17 | #endif 18 | 19 | pinMode(SDA, INPUT_PULLUP); // Make SDA (data) and SCL (clock) pins Inputs with pullup. 20 | pinMode(SCL, INPUT_PULLUP); 21 | 22 | delay(2500); // Wait 2.5 secs. This is strictly only necessary on the first power 23 | // up of the DS3231 module to allow it to initialize properly, 24 | // but is also assists in reliable programming of FioV3 boards as it gives the 25 | // IDE a chance to start uploaded the program 26 | // before existing sketch confuses the IDE by sending Serial data. 27 | 28 | boolean SCL_LOW = (digitalRead(SCL) == LOW); // Check is SCL is Low. 29 | if (SCL_LOW) { //If it is held low Arduno cannot become the I2C master. 30 | return 1; //I2C bus error. Could not clear SCL clock line held low 31 | } 32 | 33 | boolean SDA_LOW = (digitalRead(SDA) == LOW); // vi. Check SDA input. 34 | int clockCount = 20; // > 2x9 clock 35 | 36 | while (SDA_LOW && (clockCount > 0)) { // vii. If SDA is Low, 37 | clockCount--; 38 | // Note: I2C bus is open collector so do NOT drive SCL or SDA high. 39 | pinMode(SCL, INPUT); // release SCL pullup so that when made output it will be LOW 40 | pinMode(SCL, OUTPUT); // then clock SCL Low 41 | delayMicroseconds(10); // for >5uS 42 | pinMode(SCL, INPUT); // release SCL LOW 43 | pinMode(SCL, INPUT_PULLUP); // turn on pullup resistors again 44 | // do not force high as slave may be holding it low for clock stretching. 45 | delayMicroseconds(10); // for >5uS 46 | // The >5uS is so that even the slowest I2C devices are handled. 47 | SCL_LOW = (digitalRead(SCL) == LOW); // Check if SCL is Low. 48 | int counter = 20; 49 | while (SCL_LOW && (counter > 0)) { // loop waiting for SCL to become High only wait 2sec. 50 | counter--; 51 | delay(100); 52 | SCL_LOW = (digitalRead(SCL) == LOW); 53 | } 54 | if (SCL_LOW) { // still low after 2 sec error 55 | return 2; // I2C bus error. Could not clear. SCL clock line held low by slave clock stretch for >2sec 56 | } 57 | SDA_LOW = (digitalRead(SDA) == LOW); // and check SDA input again and loop 58 | } 59 | if (SDA_LOW) { // still low 60 | return 3; // I2C bus error. Could not clear. SDA data line held low 61 | } 62 | 63 | // else pull SDA line low for Start or Repeated Start 64 | pinMode(SDA, INPUT); // remove pullup. 65 | pinMode(SDA, OUTPUT); // and then make it LOW i.e. send an I2C Start or Repeated start control. 66 | // When there is only one I2C master a Start or Repeat Start has the same function as a Stop and clears the bus. 67 | /// A Repeat Start is a Start occurring after a Start with no intervening Stop. 68 | delayMicroseconds(10); // wait >5uS 69 | pinMode(SDA, INPUT); // remove output low 70 | pinMode(SDA, INPUT_PULLUP); // and make SDA high i.e. send I2C STOP control. 71 | delayMicroseconds(10); // x. wait >5uS 72 | pinMode(SDA, INPUT); // and reset pins as tri-state inputs which is the default state on reset 73 | pinMode(SCL, INPUT); 74 | return 0; // all ok 75 | 76 | } 77 | 78 | 79 | 80 | // MULAI RTC DS3231 81 | 82 | void mulaiRTC() { 83 | 84 | int rtn = I2C_ClearBus(); // clear the I2C bus first before calling Wire.begin() 85 | if (rtn != 0) { 86 | Serial.println(F("I2C bus error. Could not clear")); 87 | if (rtn == 1) { 88 | Serial.println(F("SCL clock line held low")); 89 | } else if (rtn == 2) { 90 | Serial.println(F("SCL clock line held low by slave clock stretch")); 91 | } else if (rtn == 3) { 92 | Serial.println(F("SDA data line held low")); 93 | } 94 | } else { // bus clear, re-enable Wire, now can start Wire Arduino master 95 | Wire.begin(); 96 | } 97 | 98 | Rtc.Begin(); 99 | 100 | if (!Rtc.GetIsRunning()) { 101 | 102 | Rtc.SetIsRunning(true); 103 | 104 | } 105 | 106 | Rtc.Enable32kHzPin(false); 107 | Rtc.SetSquareWavePin(DS3231SquareWavePin_ModeNone); 108 | 109 | Serial.println("Setup RTC selesai"); 110 | 111 | } 112 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-17/WebPage.h: -------------------------------------------------------------------------------- 1 | String message, XML; 2 | 3 | 4 | char setwaktu[] PROGMEM = R"=====( 5 | 6 | 7 | 8 | 9 | 10 | 11 | JWSP10 ELEKTRONMART 12 | 13 | 14 | 15 | 16 | 17 |

Ubah Waktu

18 |
19 | // 20 | :: 21 | C

22 |
23 | 24 | 25 | 32 | 39 | 40 |
26 |
27 |

Tanggal

28 |

29 | 30 |
31 |
33 |
34 |

Jam

35 |

36 | 37 |
38 |
41 |

42 | ElektronMart.Com


43 | Bukalapak 44 | Tokopedia
45 | 46 | 47 | 48 | 49 | 107 | 108 | 109 | 110 | 111 | )====="; 112 | 113 | 114 | 115 | //---------------------------------------------------------------------- 116 | // XML UNTUK JEMBATAN DATA MESIN DENGAN WEB 117 | 118 | void buildXML(){ 119 | 120 | RtcDateTime now = Rtc.GetDateTime(); 121 | RtcTemperature temp = Rtc.GetTemperature(); 122 | XML=""; 123 | XML+=""; 124 | XML+=""; 125 | XML+=now.Year(); 126 | XML+=""; 127 | XML+=""; 128 | XML+=now.Month(); 129 | XML+=""; 130 | XML+=""; 131 | XML+=now.Day(); 132 | XML+=""; 133 | XML+=""; 134 | if(now.Hour()<10){ 135 | XML+="0"; 136 | XML+=now.Hour(); 137 | }else{ XML+=now.Hour();} 138 | XML+=""; 139 | XML+=""; 140 | if(now.Minute()<10){ 141 | XML+="0"; 142 | XML+=now.Minute(); 143 | }else{ XML+=now.Minute();} 144 | XML+=""; 145 | XML+=""; 146 | if(now.Second()<10){ 147 | XML+="0"; 148 | XML+=now.Second(); 149 | }else{ XML+=now.Second();} 150 | XML+=""; 151 | XML+=""; 152 | XML+= temp.AsFloatDegC(); 153 | XML+=""; 154 | XML+=""; 155 | } 156 | 157 | void handleXML(){ 158 | buildXML(); 159 | server.send(200,"text/xml",XML); 160 | } 161 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-18/WebPage.h: -------------------------------------------------------------------------------- 1 | String message, XML; 2 | 3 | 4 | char setwaktu[] PROGMEM = R"=====( 5 | 6 | 7 | 8 | 9 | 10 | 11 | JWSP10 ELEKTRONMART 12 | 13 | 14 | 15 | 16 | 17 |

Ubah Waktu

18 |
19 | // 20 | :: 21 | C

22 |
23 | 24 | 25 | 32 | 39 | 40 |
26 |
27 |

Tanggal

28 |

29 | 30 |
31 |
33 |
34 |

Jam

35 |

36 | 37 |
38 |
41 |

42 | ElektronMart.Com


43 | Bukalapak 44 | Tokopedia
45 | 46 | 47 | 48 | 49 | 107 | 108 | 109 | 110 | 111 | )====="; 112 | 113 | 114 | 115 | //---------------------------------------------------------------------- 116 | // XML UNTUK JEMBATAN DATA MESIN DENGAN WEB 117 | 118 | void buildXML(){ 119 | 120 | RtcDateTime now = Rtc.GetDateTime(); 121 | RtcTemperature temp = Rtc.GetTemperature(); 122 | XML=""; 123 | XML+=""; 124 | XML+=""; 125 | XML+=now.Year(); 126 | XML+=""; 127 | XML+=""; 128 | XML+=now.Month(); 129 | XML+=""; 130 | XML+=""; 131 | XML+=now.Day(); 132 | XML+=""; 133 | XML+=""; 134 | if(now.Hour()<10){ 135 | XML+="0"; 136 | XML+=now.Hour(); 137 | }else{ XML+=now.Hour();} 138 | XML+=""; 139 | XML+=""; 140 | if(now.Minute()<10){ 141 | XML+="0"; 142 | XML+=now.Minute(); 143 | }else{ XML+=now.Minute();} 144 | XML+=""; 145 | XML+=""; 146 | if(now.Second()<10){ 147 | XML+="0"; 148 | XML+=now.Second(); 149 | }else{ XML+=now.Second();} 150 | XML+=""; 151 | XML+=""; 152 | XML+= temp.AsFloatDegC(); 153 | XML+=""; 154 | XML+=""; 155 | } 156 | 157 | void handleXML(){ 158 | buildXML(); 159 | server.send(200,"text/xml",XML); 160 | } 161 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-19/WebPage.h: -------------------------------------------------------------------------------- 1 | String message, XML; 2 | 3 | 4 | char setwaktu[] PROGMEM = R"=====( 5 | 6 | 7 | 8 | 9 | 10 | 11 | JWSP10 ELEKTRONMART 12 | 13 | 14 | 15 | 16 | 17 |

Ubah Waktu

18 |
19 | // 20 | :: 21 | C

22 |
23 | 24 | 25 | 32 | 39 | 40 |
26 |
27 |

Tanggal

28 |

29 | 30 |
31 |
33 |
34 |

Jam

35 |

36 | 37 |
38 |
41 |

42 | ElektronMart.Com


43 | Bukalapak 44 | Tokopedia
45 | 46 | 47 | 48 | 49 | 107 | 108 | 109 | 110 | 111 | )====="; 112 | 113 | 114 | 115 | //---------------------------------------------------------------------- 116 | // XML UNTUK JEMBATAN DATA MESIN DENGAN WEB 117 | 118 | void buildXML(){ 119 | 120 | RtcDateTime now = Rtc.GetDateTime(); 121 | RtcTemperature temp = Rtc.GetTemperature(); 122 | XML=""; 123 | XML+=""; 124 | XML+=""; 125 | XML+=now.Year(); 126 | XML+=""; 127 | XML+=""; 128 | XML+=now.Month(); 129 | XML+=""; 130 | XML+=""; 131 | XML+=now.Day(); 132 | XML+=""; 133 | XML+=""; 134 | if(now.Hour()<10){ 135 | XML+="0"; 136 | XML+=now.Hour(); 137 | }else{ XML+=now.Hour();} 138 | XML+=""; 139 | XML+=""; 140 | if(now.Minute()<10){ 141 | XML+="0"; 142 | XML+=now.Minute(); 143 | }else{ XML+=now.Minute();} 144 | XML+=""; 145 | XML+=""; 146 | if(now.Second()<10){ 147 | XML+="0"; 148 | XML+=now.Second(); 149 | }else{ XML+=now.Second();} 150 | XML+=""; 151 | XML+=""; 152 | XML+= temp.AsFloatDegC(); 153 | XML+=""; 154 | XML+=""; 155 | } 156 | 157 | void handleXML(){ 158 | buildXML(); 159 | server.send(200,"text/xml",XML); 160 | } 161 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-20/WebPage.h: -------------------------------------------------------------------------------- 1 | String message, XML; 2 | 3 | 4 | char setwaktu[] PROGMEM = R"=====( 5 | 6 | 7 | 8 | 9 | 10 | 11 | JWSP10 ELEKTRONMART 12 | 13 | 14 | 15 | 16 | 17 |

Ubah Waktu

18 |
19 | // 20 | :: 21 | C

22 |
23 | 24 | 25 | 32 | 39 | 40 |
26 |
27 |

Tanggal

28 |

29 | 30 |
31 |
33 |
34 |

Jam

35 |

36 | 37 |
38 |
41 |

42 | ElektronMart.Com


43 | Bukalapak 44 | Tokopedia
45 | 46 | 47 | 48 | 49 | 107 | 108 | 109 | 110 | 111 | )====="; 112 | 113 | 114 | 115 | //---------------------------------------------------------------------- 116 | // XML UNTUK JEMBATAN DATA MESIN DENGAN WEB 117 | 118 | void buildXML(){ 119 | 120 | RtcDateTime now = Rtc.GetDateTime(); 121 | RtcTemperature temp = Rtc.GetTemperature(); 122 | XML=""; 123 | XML+=""; 124 | XML+=""; 125 | XML+=now.Year(); 126 | XML+=""; 127 | XML+=""; 128 | XML+=now.Month(); 129 | XML+=""; 130 | XML+=""; 131 | XML+=now.Day(); 132 | XML+=""; 133 | XML+=""; 134 | if(now.Hour()<10){ 135 | XML+="0"; 136 | XML+=now.Hour(); 137 | }else{ XML+=now.Hour();} 138 | XML+=""; 139 | XML+=""; 140 | if(now.Minute()<10){ 141 | XML+="0"; 142 | XML+=now.Minute(); 143 | }else{ XML+=now.Minute();} 144 | XML+=""; 145 | XML+=""; 146 | if(now.Second()<10){ 147 | XML+="0"; 148 | XML+=now.Second(); 149 | }else{ XML+=now.Second();} 150 | XML+=""; 151 | XML+=""; 152 | XML+= temp.AsFloatDegC(); 153 | XML+=""; 154 | XML+=""; 155 | } 156 | 157 | void handleXML(){ 158 | buildXML(); 159 | server.send(200,"text/xml",XML); 160 | } 161 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-21/WebPage.h: -------------------------------------------------------------------------------- 1 | String message, XML; 2 | 3 | 4 | char setwaktu[] PROGMEM = R"=====( 5 | 6 | 7 | 8 | 9 | 10 | 11 | JWSP10 ELEKTRONMART 12 | 13 | 14 | 15 | 16 | 17 |

Ubah Waktu

18 |
19 | // 20 | :: 21 | C

22 |
23 | 24 | 25 | 32 | 39 | 40 |
26 |
27 |

Tanggal

28 |

29 | 30 |
31 |
33 |
34 |

Jam

35 |

36 | 37 |
38 |
41 |

42 | ElektronMart.Com


43 | Bukalapak 44 | Tokopedia
45 | 46 | 47 | 48 | 49 | 107 | 108 | 109 | 110 | 111 | )====="; 112 | 113 | 114 | 115 | //---------------------------------------------------------------------- 116 | // XML UNTUK JEMBATAN DATA MESIN DENGAN WEB 117 | 118 | void buildXML(){ 119 | 120 | RtcDateTime now = Rtc.GetDateTime(); 121 | RtcTemperature temp = Rtc.GetTemperature(); 122 | XML=""; 123 | XML+=""; 124 | XML+=""; 125 | XML+=now.Year(); 126 | XML+=""; 127 | XML+=""; 128 | XML+=now.Month(); 129 | XML+=""; 130 | XML+=""; 131 | XML+=now.Day(); 132 | XML+=""; 133 | XML+=""; 134 | if(now.Hour()<10){ 135 | XML+="0"; 136 | XML+=now.Hour(); 137 | }else{ XML+=now.Hour();} 138 | XML+=""; 139 | XML+=""; 140 | if(now.Minute()<10){ 141 | XML+="0"; 142 | XML+=now.Minute(); 143 | }else{ XML+=now.Minute();} 144 | XML+=""; 145 | XML+=""; 146 | if(now.Second()<10){ 147 | XML+="0"; 148 | XML+=now.Second(); 149 | }else{ XML+=now.Second();} 150 | XML+=""; 151 | XML+=""; 152 | XML+= temp.AsFloatDegC(); 153 | XML+=""; 154 | XML+=""; 155 | } 156 | 157 | void handleXML(){ 158 | buildXML(); 159 | server.send(200,"text/xml",XML); 160 | } 161 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-22/WebPage.h: -------------------------------------------------------------------------------- 1 | String message, XML; 2 | 3 | 4 | char setwaktu[] PROGMEM = R"=====( 5 | 6 | 7 | 8 | 9 | 10 | 11 | JWSP10 ELEKTRONMART 12 | 13 | 14 | 15 | 16 | 17 |

Ubah Waktu

18 |
19 | // 20 | :: 21 | C

22 |
23 | 24 | 25 | 32 | 39 | 40 |
26 |
27 |

Tanggal

28 |

29 | 30 |
31 |
33 |
34 |

Jam

35 |

36 | 37 |
38 |
41 |

42 | ElektronMart.Com


43 | Bukalapak 44 | Tokopedia
45 | 46 | 47 | 48 | 49 | 107 | 108 | 109 | 110 | 111 | )====="; 112 | 113 | 114 | 115 | //---------------------------------------------------------------------- 116 | // XML UNTUK JEMBATAN DATA MESIN DENGAN WEB 117 | 118 | void buildXML(){ 119 | 120 | RtcDateTime now = Rtc.GetDateTime(); 121 | RtcTemperature temp = Rtc.GetTemperature(); 122 | XML=""; 123 | XML+=""; 124 | XML+=""; 125 | XML+=now.Year(); 126 | XML+=""; 127 | XML+=""; 128 | XML+=now.Month(); 129 | XML+=""; 130 | XML+=""; 131 | XML+=now.Day(); 132 | XML+=""; 133 | XML+=""; 134 | if(now.Hour()<10){ 135 | XML+="0"; 136 | XML+=now.Hour(); 137 | }else{ XML+=now.Hour();} 138 | XML+=""; 139 | XML+=""; 140 | if(now.Minute()<10){ 141 | XML+="0"; 142 | XML+=now.Minute(); 143 | }else{ XML+=now.Minute();} 144 | XML+=""; 145 | XML+=""; 146 | if(now.Second()<10){ 147 | XML+="0"; 148 | XML+=now.Second(); 149 | }else{ XML+=now.Second();} 150 | XML+=""; 151 | XML+=""; 152 | XML+= temp.AsFloatDegC(); 153 | XML+=""; 154 | XML+=""; 155 | } 156 | 157 | void handleXML(){ 158 | buildXML(); 159 | server.send(200,"text/xml",XML); 160 | } 161 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-23/WebPage.h: -------------------------------------------------------------------------------- 1 | String message, XML; 2 | 3 | 4 | char setwaktu[] PROGMEM = R"=====( 5 | 6 | 7 | 8 | 9 | 10 | 11 | JWSP10 ELEKTRONMART 12 | 13 | 14 | 15 | 16 | 17 |

Ubah Waktu

18 |
19 | // 20 | :: 21 | C

22 |
23 | 24 | 25 | 32 | 39 | 40 |
26 |
27 |

Tanggal

28 |

29 | 30 |
31 |
33 |
34 |

Jam

35 |

36 | 37 |
38 |
41 |

42 | ElektronMart.Com


43 | Bukalapak 44 | Tokopedia
45 | 46 | 47 | 48 | 49 | 107 | 108 | 109 | 110 | 111 | )====="; 112 | 113 | 114 | 115 | //---------------------------------------------------------------------- 116 | // XML UNTUK JEMBATAN DATA MESIN DENGAN WEB 117 | 118 | void buildXML(){ 119 | 120 | RtcDateTime now = Rtc.GetDateTime(); 121 | RtcTemperature temp = Rtc.GetTemperature(); 122 | XML=""; 123 | XML+=""; 124 | XML+=""; 125 | XML+=now.Year(); 126 | XML+=""; 127 | XML+=""; 128 | XML+=now.Month(); 129 | XML+=""; 130 | XML+=""; 131 | XML+=now.Day(); 132 | XML+=""; 133 | XML+=""; 134 | if(now.Hour()<10){ 135 | XML+="0"; 136 | XML+=now.Hour(); 137 | }else{ XML+=now.Hour();} 138 | XML+=""; 139 | XML+=""; 140 | if(now.Minute()<10){ 141 | XML+="0"; 142 | XML+=now.Minute(); 143 | }else{ XML+=now.Minute();} 144 | XML+=""; 145 | XML+=""; 146 | if(now.Second()<10){ 147 | XML+="0"; 148 | XML+=now.Second(); 149 | }else{ XML+=now.Second();} 150 | XML+=""; 151 | XML+=""; 152 | XML+= temp.AsFloatDegC(); 153 | XML+=""; 154 | XML+=""; 155 | } 156 | 157 | void handleXML(){ 158 | buildXML(); 159 | server.send(200,"text/xml",XML); 160 | } 161 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-23/RTC.h: -------------------------------------------------------------------------------- 1 | // ------------------------ 2 | // SETUP RTC 3 | 4 | RtcDateTime now; 5 | char namaHari[][7] = {"AHAD", "SENIN", "SELASA", "RABU", "KAMIS", "JUM'AT", "SABTU", "AHAD"}; // array hari, dihitung mulai dari senin, hari senin angka nya =0, 6 | char namaBulan[][4] = { "DES", "JAN", "FEB", "MAR", "APR", "MEI", "JUN", "JUL", "AGU", "SEP", "OKT", "NOV", "DES" }; 7 | char hariHijriah[][8] = {"AHAD", "ISNAIN", "SULASA", "ARBI'A", "KHAMIS", "JUMU'AH", "SABT", "AHAD"}; 8 | char bulanHijriah[][4] = { "ZLH", "MUH", "SAF", "RAW", "RAK", "JUW", "JUK", "RAJ", "SYB", "RAM", "SYW", "ZLK", "ZLH" }; 9 | 10 | 11 | uint8_t rJam; 12 | uint8_t rMen; 13 | uint8_t rDet; 14 | uint8_t rTgl; 15 | uint8_t rHar; 16 | uint8_t rBul; 17 | uint16_t rTah; 18 | int celsius; 19 | 20 | 21 | // PrayerTimes 22 | double times[sizeof(TimeName)/sizeof(char*)]; 23 | 24 | 25 | //---------------------------------------------------------------------- 26 | // I2C_ClearBus menghindari gagal baca RTC (nilai 00 atau 165) 27 | 28 | int I2C_ClearBus() { 29 | 30 | #if defined(TWCR) && defined(TWEN) 31 | TWCR &= ~(_BV(TWEN)); //Disable the Atmel 2-Wire interface so we can control the SDA and SCL pins directly 32 | #endif 33 | 34 | pinMode(SDA, INPUT_PULLUP); // Make SDA (data) and SCL (clock) pins Inputs with pullup. 35 | pinMode(SCL, INPUT_PULLUP); 36 | 37 | delay(2500); // Wait 2.5 secs. This is strictly only necessary on the first power 38 | // up of the DS3231 module to allow it to initialize properly, 39 | // but is also assists in reliable programming of FioV3 boards as it gives the 40 | // IDE a chance to start uploaded the program 41 | // before existing sketch confuses the IDE by sending Serial data. 42 | 43 | boolean SCL_LOW = (digitalRead(SCL) == LOW); // Check is SCL is Low. 44 | if (SCL_LOW) { //If it is held low Arduno cannot become the I2C master. 45 | return 1; //I2C bus error. Could not clear SCL clock line held low 46 | } 47 | 48 | boolean SDA_LOW = (digitalRead(SDA) == LOW); // vi. Check SDA input. 49 | int clockCount = 20; // > 2x9 clock 50 | 51 | while (SDA_LOW && (clockCount > 0)) { // vii. If SDA is Low, 52 | clockCount--; 53 | // Note: I2C bus is open collector so do NOT drive SCL or SDA high. 54 | pinMode(SCL, INPUT); // release SCL pullup so that when made output it will be LOW 55 | pinMode(SCL, OUTPUT); // then clock SCL Low 56 | delayMicroseconds(10); // for >5uS 57 | pinMode(SCL, INPUT); // release SCL LOW 58 | pinMode(SCL, INPUT_PULLUP); // turn on pullup resistors again 59 | // do not force high as slave may be holding it low for clock stretching. 60 | delayMicroseconds(10); // for >5uS 61 | // The >5uS is so that even the slowest I2C devices are handled. 62 | SCL_LOW = (digitalRead(SCL) == LOW); // Check if SCL is Low. 63 | int counter = 20; 64 | while (SCL_LOW && (counter > 0)) { // loop waiting for SCL to become High only wait 2sec. 65 | counter--; 66 | delay(100); 67 | SCL_LOW = (digitalRead(SCL) == LOW); 68 | } 69 | if (SCL_LOW) { // still low after 2 sec error 70 | return 2; // I2C bus error. Could not clear. SCL clock line held low by slave clock stretch for >2sec 71 | } 72 | SDA_LOW = (digitalRead(SDA) == LOW); // and check SDA input again and loop 73 | } 74 | if (SDA_LOW) { // still low 75 | return 3; // I2C bus error. Could not clear. SDA data line held low 76 | } 77 | 78 | // else pull SDA line low for Start or Repeated Start 79 | pinMode(SDA, INPUT); // remove pullup. 80 | pinMode(SDA, OUTPUT); // and then make it LOW i.e. send an I2C Start or Repeated start control. 81 | // When there is only one I2C master a Start or Repeat Start has the same function as a Stop and clears the bus. 82 | /// A Repeat Start is a Start occurring after a Start with no intervening Stop. 83 | delayMicroseconds(10); // wait >5uS 84 | pinMode(SDA, INPUT); // remove output low 85 | pinMode(SDA, INPUT_PULLUP); // and make SDA high i.e. send I2C STOP control. 86 | delayMicroseconds(10); // x. wait >5uS 87 | pinMode(SDA, INPUT); // and reset pins as tri-state inputs which is the default state on reset 88 | pinMode(SCL, INPUT); 89 | return 0; // all ok 90 | 91 | } 92 | 93 | 94 | 95 | // MULAI RTC DS3231 96 | 97 | void mulaiRTC() { 98 | 99 | int rtn = I2C_ClearBus(); // clear the I2C bus first before calling Wire.begin() 100 | if (rtn != 0) { 101 | Serial.println(F("I2C bus error. Could not clear")); 102 | if (rtn == 1) { 103 | Serial.println(F("SCL clock line held low")); 104 | } else if (rtn == 2) { 105 | Serial.println(F("SCL clock line held low by slave clock stretch")); 106 | } else if (rtn == 3) { 107 | Serial.println(F("SDA data line held low")); 108 | } 109 | } else { // bus clear, re-enable Wire, now can start Wire Arduino master 110 | Wire.begin(); 111 | } 112 | 113 | Rtc.Begin(); 114 | 115 | if (!Rtc.GetIsRunning()) { 116 | 117 | Rtc.SetIsRunning(true); 118 | 119 | } 120 | 121 | Rtc.Enable32kHzPin(false); 122 | Rtc.SetSquareWavePin(DS3231SquareWavePin_ModeNone); 123 | 124 | Serial.println("Setup RTC selesai"); 125 | 126 | } 127 | 128 | 129 | //---------------------------------------------------------------------- 130 | // UPDATE WAKTU 131 | 132 | void BacaRTC() { 133 | RtcDateTime now = Rtc.GetDateTime(); 134 | RtcTemperature temp = Rtc.GetTemperature(); 135 | celsius = temp.AsFloatDegC(); 136 | rJam = now.Hour(); 137 | rMen = now.Minute(); 138 | rDet = now.Second(); 139 | rTgl = now.Day(); 140 | rHar = now.DayOfWeek(); 141 | rBul = now.Month(); 142 | rTah = now.Year(); 143 | } 144 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-24/RTC.h: -------------------------------------------------------------------------------- 1 | // ------------------------ 2 | // SETUP RTC 3 | 4 | RtcDateTime now; 5 | char namaHari[][7] = {"AHAD", "SENIN", "SELASA", "RABU", "KAMIS", "JUM'AT", "SABTU", "AHAD"}; // array hari, dihitung mulai dari senin, hari senin angka nya =0, 6 | char namaBulan[][4] = { "DES", "JAN", "FEB", "MAR", "APR", "MEI", "JUN", "JUL", "AGU", "SEP", "OKT", "NOV", "DES" }; 7 | char hariHijriah[][8] = {"AHAD", "ISNAIN", "SULASA", "ARBI'A", "KHAMIS", "JUMU'AH", "SABT", "AHAD"}; 8 | char bulanHijriah[][4] = { "ZLH", "MUH", "SAF", "RAW", "RAK", "JUW", "JUK", "RAJ", "SYB", "RAM", "SYW", "ZLK", "ZLH" }; 9 | 10 | 11 | uint8_t rJam; 12 | uint8_t rMen; 13 | uint8_t rDet; 14 | uint8_t rTgl; 15 | uint8_t rHar; 16 | uint8_t rBul; 17 | uint16_t rTah; 18 | int celsius; 19 | 20 | 21 | // PrayerTimes 22 | double times[sizeof(TimeName)/sizeof(char*)]; 23 | 24 | 25 | //---------------------------------------------------------------------- 26 | // I2C_ClearBus menghindari gagal baca RTC (nilai 00 atau 165) 27 | 28 | int I2C_ClearBus() { 29 | 30 | #if defined(TWCR) && defined(TWEN) 31 | TWCR &= ~(_BV(TWEN)); //Disable the Atmel 2-Wire interface so we can control the SDA and SCL pins directly 32 | #endif 33 | 34 | pinMode(SDA, INPUT_PULLUP); // Make SDA (data) and SCL (clock) pins Inputs with pullup. 35 | pinMode(SCL, INPUT_PULLUP); 36 | 37 | delay(2500); // Wait 2.5 secs. This is strictly only necessary on the first power 38 | // up of the DS3231 module to allow it to initialize properly, 39 | // but is also assists in reliable programming of FioV3 boards as it gives the 40 | // IDE a chance to start uploaded the program 41 | // before existing sketch confuses the IDE by sending Serial data. 42 | 43 | boolean SCL_LOW = (digitalRead(SCL) == LOW); // Check is SCL is Low. 44 | if (SCL_LOW) { //If it is held low Arduno cannot become the I2C master. 45 | return 1; //I2C bus error. Could not clear SCL clock line held low 46 | } 47 | 48 | boolean SDA_LOW = (digitalRead(SDA) == LOW); // vi. Check SDA input. 49 | int clockCount = 20; // > 2x9 clock 50 | 51 | while (SDA_LOW && (clockCount > 0)) { // vii. If SDA is Low, 52 | clockCount--; 53 | // Note: I2C bus is open collector so do NOT drive SCL or SDA high. 54 | pinMode(SCL, INPUT); // release SCL pullup so that when made output it will be LOW 55 | pinMode(SCL, OUTPUT); // then clock SCL Low 56 | delayMicroseconds(10); // for >5uS 57 | pinMode(SCL, INPUT); // release SCL LOW 58 | pinMode(SCL, INPUT_PULLUP); // turn on pullup resistors again 59 | // do not force high as slave may be holding it low for clock stretching. 60 | delayMicroseconds(10); // for >5uS 61 | // The >5uS is so that even the slowest I2C devices are handled. 62 | SCL_LOW = (digitalRead(SCL) == LOW); // Check if SCL is Low. 63 | int counter = 20; 64 | while (SCL_LOW && (counter > 0)) { // loop waiting for SCL to become High only wait 2sec. 65 | counter--; 66 | delay(100); 67 | SCL_LOW = (digitalRead(SCL) == LOW); 68 | } 69 | if (SCL_LOW) { // still low after 2 sec error 70 | return 2; // I2C bus error. Could not clear. SCL clock line held low by slave clock stretch for >2sec 71 | } 72 | SDA_LOW = (digitalRead(SDA) == LOW); // and check SDA input again and loop 73 | } 74 | if (SDA_LOW) { // still low 75 | return 3; // I2C bus error. Could not clear. SDA data line held low 76 | } 77 | 78 | // else pull SDA line low for Start or Repeated Start 79 | pinMode(SDA, INPUT); // remove pullup. 80 | pinMode(SDA, OUTPUT); // and then make it LOW i.e. send an I2C Start or Repeated start control. 81 | // When there is only one I2C master a Start or Repeat Start has the same function as a Stop and clears the bus. 82 | /// A Repeat Start is a Start occurring after a Start with no intervening Stop. 83 | delayMicroseconds(10); // wait >5uS 84 | pinMode(SDA, INPUT); // remove output low 85 | pinMode(SDA, INPUT_PULLUP); // and make SDA high i.e. send I2C STOP control. 86 | delayMicroseconds(10); // x. wait >5uS 87 | pinMode(SDA, INPUT); // and reset pins as tri-state inputs which is the default state on reset 88 | pinMode(SCL, INPUT); 89 | return 0; // all ok 90 | 91 | } 92 | 93 | 94 | 95 | // MULAI RTC DS3231 96 | 97 | void mulaiRTC() { 98 | 99 | int rtn = I2C_ClearBus(); // clear the I2C bus first before calling Wire.begin() 100 | if (rtn != 0) { 101 | Serial.println(F("I2C bus error. Could not clear")); 102 | if (rtn == 1) { 103 | Serial.println(F("SCL clock line held low")); 104 | } else if (rtn == 2) { 105 | Serial.println(F("SCL clock line held low by slave clock stretch")); 106 | } else if (rtn == 3) { 107 | Serial.println(F("SDA data line held low")); 108 | } 109 | } else { // bus clear, re-enable Wire, now can start Wire Arduino master 110 | Wire.begin(); 111 | } 112 | 113 | Rtc.Begin(); 114 | 115 | if (!Rtc.GetIsRunning()) { 116 | 117 | Rtc.SetIsRunning(true); 118 | 119 | } 120 | 121 | Rtc.Enable32kHzPin(false); 122 | Rtc.SetSquareWavePin(DS3231SquareWavePin_ModeNone); 123 | 124 | Serial.println("Setup RTC selesai"); 125 | 126 | } 127 | 128 | 129 | //---------------------------------------------------------------------- 130 | // UPDATE WAKTU 131 | 132 | void BacaRTC() { 133 | RtcDateTime now = Rtc.GetDateTime(); 134 | RtcTemperature temp = Rtc.GetTemperature(); 135 | celsius = temp.AsFloatDegC(); 136 | rJam = now.Hour(); 137 | rMen = now.Minute(); 138 | rDet = now.Second(); 139 | rTgl = now.Day(); 140 | rHar = now.DayOfWeek(); 141 | rBul = now.Month(); 142 | rTah = now.Year(); 143 | } 144 | -------------------------------------------------------------------------------- /ArduinoNano/JadwalSholat-P10-1Panel/fonts/Font3x5.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * 4 | * Font3x5 5 | * 6 | * created with FontCreator 7 | * written by F. Maximilian Thiele 8 | * 9 | * http://www.apetech.de/fontCreator 10 | * me@apetech.de 11 | * 12 | * File Name : Font3x5.h 13 | * Date : 17.02.2012 14 | * Font size in bytes : 1472 15 | * Font width : 3 16 | * Font height : 5 17 | * Font first char : 32 18 | * Font last char : 128 19 | * Font used chars : 96 20 | * 21 | * The font data are defined as 22 | * 23 | * struct _FONT_ { 24 | * uint16_t font_Size_in_Bytes_over_all_included_Size_it_self; 25 | * uint8_t font_Width_in_Pixel_for_fixed_drawing; 26 | * uint8_t font_Height_in_Pixel_for_all_characters; 27 | * unit8_t font_First_Char; 28 | * uint8_t font_Char_Count; 29 | * 30 | * uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1]; 31 | * // for each character the separate width in pixels, 32 | * // characters < 128 have an implicit virtual right empty row 33 | * 34 | * uint8_t font_data[]; 35 | * // bit field of all characters 36 | */ 37 | 38 | #include 39 | #if (defined(__AVR__)) 40 | #include 41 | #else 42 | #include 43 | #endif 44 | 45 | #ifndef FONT3X5_H 46 | #define FONT3X5_H 47 | 48 | #define FONT3X5_WIDTH 3 49 | #define FONT3X5_HEIGHT 5 50 | 51 | const static uint8_t Font3x5[] PROGMEM = { 52 | 0x05, 0xC0, // size 53 | 0x03, // width 54 | 0x07, // height>> FIRST 5 55 | 0x20, // first char 56 | 0x60, // char count 57 | 58 | // char widths 59 | 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x02, 0x02, 60 | 0x03, 0x03, 0x01, 0x03, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 61 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 62 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 63 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x05, 0x04, 0x03, 0x03, 0x03, 64 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x05, 0x03, 0x03, 0x03, 0x02, 65 | 0x03, 0x02, 0x03, 0x03, 0x02, 0x03, 0x03, 0x03, 0x03, 0x03, 66 | 0x03, 0x03, 0x03, 0x01, 0x03, 0x03, 0x01, 0x05, 0x03, 0x03, 67 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x05, 0x03, 0x03, 68 | 0x03, 0x03, 0x01, 0x03, 0x03, 0x03, 69 | 70 | // font data 71 | 0x00, 0x00, 0x00, // 32 72 | 0xB8, // 33 73 | 0x18, 0x00, 0x18, // 34 74 | 0xF8, 0x70, 0xF8, // 35 75 | 0x10, 0xF8, 0x40, // 36 76 | 0x00, 0x00, 0x00, // 37 77 | 0x00, 0x00, 0x00, // 38 78 | 0x18, // 39 79 | 0x70, 0x88, // 40 80 | 0x88, 0x70, // 41 81 | 0x70, 0x70, 0x70, // 42 82 | 0x20, 0x70, 0x20, // 43 83 | 0xC0, // 44 84 | 0x20, 0x20, 0x20, // 45 85 | 0x80, // 46 86 | 0xC0, 0x20, 0x18, // 47 87 | 0xF8, 0x88, 0xF8, // 48 88 | 0x90, 0xF8, 0x80, // 49 89 | 0xE8, 0xA8, 0xB8, // 50 90 | 0xA8, 0xA8, 0xF8, // 51 91 | 0x38, 0x20, 0xF8, // 52 92 | 0xB8, 0xA8, 0xE8, // 53 93 | 0xF8, 0xA8, 0xE8, // 54 94 | 0x08, 0xE8, 0x18, // 55 95 | 0xF8, 0xA8, 0xF8, // 56 96 | 0xB8, 0xA8, 0xF8, // 57 97 | 0x50, // 58 98 | 0xD0, // 59 99 | 0x20, 0x50, 0x88, // 60 100 | 0x50, 0x50, 0x50, // 61 101 | 0x88, 0x50, 0x20, // 62 102 | 0x08, 0xA8, 0x18, // 63 103 | 0x70, 0xE8, 0x70, // 64 104 | 0xF0, 0x28, 0xF0, // 65 105 | 0xF8, 0xA8, 0x50, // 66 106 | 0xF8, 0x88, 0x88, // 67 107 | 0xF8, 0x88, 0x70, // 68 108 | 0xF8, 0xA8, 0xA8, // 69 109 | 0xF8, 0x28, 0x28, // 70 110 | 0xF8, 0x88, 0xC8, // 71 111 | 0xF8, 0x20, 0xF8, // 72 112 | 0x88, 0xF8, 0x88, // 73 113 | 0x40, 0x80, 0x78, // 74 114 | 0xF8, 0x20, 0xD8, // 75 115 | 0xF8, 0x80, 0x80, // 76 116 | 0xF8, 0x10, 0xE0, 0x10, 0xF8, // 77 117 | 0xF8, 0x30, 0x40, 0xF8, // 78 118 | 0xF8, 0x88, 0xF8, // 79 119 | 0xF8, 0x28, 0x38, // 80 120 | 0x78, 0x48, 0xF8, // 81 121 | 0xF8, 0x28, 0xD0, // 82 122 | 0xB8, 0xA8, 0xE8, // 83 123 | 0x08, 0xF8, 0x08, // 84 124 | 0xF8, 0x80, 0xF8, // 85 125 | 0x78, 0x80, 0x78, // 86 126 | 0x78, 0x80, 0x78, 0x80, 0x78, // 87 127 | 0xD8, 0x20, 0xD8, // 88 128 | 0x18, 0xE0, 0x18, // 89 129 | 0xC8, 0xA8, 0x98, // 90 130 | 0xF8, 0x88, // 91 131 | 0x18, 0x20, 0xC0, // 92 132 | 0x88, 0xF8, // 93 133 | 0x10, 0x08, 0x10, // 94 134 | 0x80, 0x80, 0x80, // 95 135 | 0x08, 0x10, // 96 136 | 0xE8, 0xA8, 0xF8, // 97 137 | 0xF8, 0xA0, 0xE0, // 98 138 | 0xE0, 0xA0, 0xA0, // 99 139 | 0xE0, 0xA0, 0xF8, // 100 140 | 0xF8, 0xA8, 0xB8, // 101 141 | 0xF8, 0x28, 0x08, // 102 142 | 0xB8, 0xA8, 0xF8, // 103 143 | 0xF8, 0x20, 0xE0, // 104 144 | 0xE8, // 105 145 | 0x40, 0x80, 0x68, // 106 146 | 0xF8, 0x40, 0xA0, // 107 147 | 0xF8, // 108 148 | 0xF0, 0x20, 0xC0, 0x20, 0xC0, // 109 149 | 0xE0, 0x20, 0xC0, // 110 150 | 0xE0, 0xA0, 0xE0, // 111 151 | 0xF8, 0x28, 0x30, // 112 152 | 0x38, 0x28, 0xF0, // 113 153 | 0xE0, 0x20, 0x20, // 114 154 | 0x90, 0xA8, 0x48, // 115 155 | 0x10, 0xF8, 0x10, // 116 156 | 0xE0, 0x80, 0xE0, // 117 157 | 0x60, 0x80, 0x60, // 118 158 | 0x60, 0x80, 0x60, 0x80, 0x60, // 119 159 | 0xA0, 0x40, 0xA0, // 120 160 | 0x30, 0xA0, 0xF0, // 121 161 | 0xC8, 0xA8, 0x98, // 122 162 | 0x20, 0xF8, 0x88, // 123 163 | 0xF8, // 124 164 | 0x88, 0xF8, 0x20, // 125 165 | 0x60, 0x20, 0x30, // 126 166 | 0x00, 0x00, 0x00 // 127 167 | 168 | }; 169 | 170 | #endif 171 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-1Panel/libraries/HJS589/fonts/ElektronMart5x6.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * ElektronMartArabic5x6 4 | * 5 | * 6 | * File Name : ElektronMartArabic5x6.h 7 | * Date : 6 Sept 2019 8 | * Font width : 6 9 | * Font height : 16 10 | * Font first char : 32 11 | * Font last char : 127 12 | * Font used chars : 94 13 | * 14 | * The font data are defined as 15 | * 16 | * struct _FONT_ { 17 | * uint16_t font_Size_in_Bytes_over_all_included_Size_it_self; 18 | * uint8_t font_Width_in_Pixel_for_fixed_drawing; 19 | * uint8_t font_Height_in_Pixel_for_all_characters; 20 | * unit8_t font_First_Char; 21 | * uint8_t font_Char_Count; 22 | * 23 | * uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1]; 24 | * // for each character the separate width in pixels, 25 | * // characters < 128 have an implicit virtual right empty row 26 | * 27 | * uint8_t font_data[]; 28 | * // bit field of all characters 29 | */ 30 | 31 | #include 32 | #ifdef __AVR__ 33 | #include 34 | #elif defined (ESP8266) 35 | #include 36 | #else 37 | #define PROGMEM 38 | #endif 39 | 40 | #ifndef ELEKTRONMART5x6_H 41 | #define ELEKTRONMART5x6_H 42 | 43 | #define ELEKTRONMART5x6_WIDTH 5 44 | #define ELEKTRONMART5x6_HEIGHT 8 45 | 46 | const static uint8_t ElektronMart5x6[] PROGMEM = { 47 | 0x03, 0x07, // size // size of zero indicates fixed width font, actual length is width * height 48 | 0x05, // width 49 | 0x08, // height 50 | 0x20, // first char 51 | 0x60, // char count 52 | 53 | 0x01,0x06,0x03,0x03,0x03,0x03,0x03,0x01,0x03,0x03, // ! " # $ % & ' ( ) 54 | 0x03,0x03,0x02,0x03,0x02,0x03,0x05,0x05,0x05,0x05, //* + , - . / 0 1 2 3 55 | 0x05,0x05,0x05,0x05,0x05,0x05,0x02,0x06,0x06,0x06, //4 5 6 7 8 9 : ; < = 56 | 0x06,0x06,0x06,0x03,0x03,0x03,0x03,0x03,0x03,0x03, //> ? @ A B C D E F G 57 | 0x03,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, //H I J K L M N O P Q 58 | 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x06, //R S T U V W X Y Z [ 59 | 0x06,0x06,0x06,0x06,0x06,0x03,0x03,0x03,0x03,0x03, //\ ] ^ _ ` a b c d e 60 | 0x03,0x03,0x03,0x01,0x02,0x03,0x01,0x03,0x03,0x03, //f g h i j k l m n o 61 | 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, //p q r s t u v w x y 62 | 0x03,0x06,0x06,0x06,0x06,0x06, 63 | 64 | 65 | 66 | // font data 67 | 0x00,// (space) 68 | 0x3c, 0x7e, 0x52, 0x52, 0x7e, 0x3c,// ! 69 | 0x06, 0x00, 0x06,// " 70 | 0x7c, 0x28, 0x7c,// # 71 | 0x2c, 0x76, 0x24,// $ 72 | 0x62, 0x10, 0x4e,// % 73 | 0x3e, 0x2a, 0x7e,// & 74 | 0x06,// ' 75 | 0x18, 0x24, 0x42,// ( 76 | 0x42, 0x24, 0x18,// ) 77 | 0x0e, 0x0a, 0x0e,// * 78 | 0x10, 0x38, 0x10,// + 79 | 0x40, 0x20,// , 80 | 0x10, 0x10, 0x10,// - 81 | 0x60, 0x60, // . 82 | 0x60, 0x18, 0x06,// / 83 | 0x3e, 0x7e, 0x42, 0x7e, 0x7c, //0 84 | 0x00, 0x3e, 0x7c, 0x00, 0x00, //1 85 | 0x32, 0x72, 0x52, 0x5e, 0x5c, //2 86 | 0x42, 0x52, 0x52, 0x7e, 0x7c, //3 87 | 0x0e, 0x1e, 0x10, 0x3e, 0x7c, //4 88 | 0x4e, 0x5e, 0x52, 0x72, 0x72, //5 89 | 0x3e, 0x7e, 0x4a, 0x7a, 0x7a, //6 90 | 0x02, 0x02, 0x02, 0x3e, 0x7c, //7 91 | 0x3e, 0x7e, 0x52, 0x7e, 0x7c, //8 92 | 0x4e, 0x5e, 0x52, 0x7e, 0x7c, //9 93 | 0x2c, 0x68,// : 94 | 0x00, 0x36, 0x36, 0x76, 0x74, 0x00,// ; 95 | 0x1c, 0x3e, 0x36, 0x36, 0x36, 0x34,// < 96 | 0x16, 0x36, 0x36, 0x36, 0x36, 0x34,// = 97 | 0x16, 0x36, 0x36, 0x36, 0x3e, 0x1c,// > 98 | 0x03, 0x07, 0x03, 0x5b, 0x5f, 0x0e,// ? 99 | 0x7f, 0x41, 0x5d, 0x55, 0x5d, 0x7d,// @ 100 | 0x7c, 0x12, 0x7c,// A 101 | 0x7e, 0x52, 0x7e,// B 102 | 0x7e, 0x42, 0x42,// C 103 | 0x7e, 0x42, 0x3e,// D 104 | 0x7e, 0x52, 0x52,// E 105 | 0x7e, 0x12, 0x12,// F 106 | 0x7e, 0x42, 0x72,// G 107 | 0x7e, 0x10, 0x7e,// H 108 | 0x7e, // I 109 | 0x40, 0x42, 0x7e,// J 110 | 0x7e, 0x10, 0x6e,// K 111 | 0x7e, 0x40, 0x40,// L 112 | 0x7e, 0x04, 0x7e,// M 113 | 0x7e, 0x02, 0x7e,// N 114 | 0x7e, 0x42, 0x7e,// O 115 | 0x7e, 0x12, 0x1e,// P 116 | 0x3e, 0x22, 0x7e,// Q 117 | 0x7e, 0x12, 0x6e,// R 118 | 0x4e, 0x4a, 0x7a,// S 119 | 0x02, 0x7e, 0x02,// T 120 | 0x7e, 0x40, 0x7e,// U 121 | 0x3e, 0x40, 0x3e,// V 122 | 0x7e, 0x20, 0x7e,// W 123 | 0x76, 0x08, 0x76,// X 124 | 0x1e, 0x70, 0x1e,// Y 125 | 0x72, 0x4a, 0x46,// Z 126 | 0x1c, 0x3c, 0x3c, 0x3c, 0x3c, 0x38,// [ 127 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// "\" 128 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// ] 129 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// ^ 130 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// _ 131 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// ` 132 | 0x3c, 0x24, 0x7c,// a 133 | 0x7e, 0x44, 0x7c,// b 134 | 0x7c, 0x44, 0x44,// c 135 | 0x7c, 0x44, 0x7e,// d 136 | 0x7c, 0x54, 0x5c,// e 137 | 0x7c, 0x14, 0x04,// f 138 | 0x3c, 0xa4, 0xfc,// g 139 | 0x7e, 0x04, 0x7c,// h 140 | 0x7c, // i 141 | 0x80, 0xfc, // j 142 | 0x7e, 0x10, 0x6c,// k 143 | 0x7e, // l 144 | 0x7c, 0x08, 0x7c,// m 145 | 0x7c, 0x04, 0x7c,// n 146 | 0x7c, 0x44, 0x7c,// o 147 | 0xfc, 0x44, 0x7c,// p 148 | 0x7c, 0x44, 0xfc,// q 149 | 0x7c, 0x04, 0x04,// r 150 | 0x5c, 0x54, 0x74,// s 151 | 0x7e, 0x44, 0x40,// t 152 | 0x7c, 0x40, 0x7c,// u 153 | 0x3c, 0x40, 0x3c,// v 154 | 0x7c, 0x20, 0x7c,// w 155 | 0x6c, 0x10, 0x6c,// x 156 | 0x1c, 0x70, 0x1c,// y 157 | 0x64, 0x54, 0x4c,// z 158 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// { 159 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// | 160 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// } 161 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// -> 162 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e // <- 163 | 164 | 165 | 166 | // font data | 167 | 168 | 169 | }; 170 | 171 | #endif 172 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-2Panel/libraries/HJS589/fonts/ElektronMart5x6.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * ElektronMartArabic5x6 4 | * 5 | * 6 | * File Name : ElektronMartArabic5x6.h 7 | * Date : 6 Sept 2019 8 | * Font width : 6 9 | * Font height : 16 10 | * Font first char : 32 11 | * Font last char : 127 12 | * Font used chars : 94 13 | * 14 | * The font data are defined as 15 | * 16 | * struct _FONT_ { 17 | * uint16_t font_Size_in_Bytes_over_all_included_Size_it_self; 18 | * uint8_t font_Width_in_Pixel_for_fixed_drawing; 19 | * uint8_t font_Height_in_Pixel_for_all_characters; 20 | * unit8_t font_First_Char; 21 | * uint8_t font_Char_Count; 22 | * 23 | * uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1]; 24 | * // for each character the separate width in pixels, 25 | * // characters < 128 have an implicit virtual right empty row 26 | * 27 | * uint8_t font_data[]; 28 | * // bit field of all characters 29 | */ 30 | 31 | #include 32 | #ifdef __AVR__ 33 | #include 34 | #elif defined (ESP8266) 35 | #include 36 | #else 37 | #define PROGMEM 38 | #endif 39 | 40 | #ifndef ELEKTRONMART5x6_H 41 | #define ELEKTRONMART5x6_H 42 | 43 | #define ELEKTRONMART5x6_WIDTH 5 44 | #define ELEKTRONMART5x6_HEIGHT 8 45 | 46 | const static uint8_t ElektronMart5x6[] PROGMEM = { 47 | 0x03, 0x07, // size // size of zero indicates fixed width font, actual length is width * height 48 | 0x05, // width 49 | 0x08, // height 50 | 0x20, // first char 51 | 0x60, // char count 52 | 53 | 0x01,0x06,0x03,0x03,0x03,0x03,0x03,0x01,0x03,0x03, // ! " # $ % & ' ( ) 54 | 0x03,0x03,0x02,0x03,0x02,0x03,0x05,0x05,0x05,0x05, //* + , - . / 0 1 2 3 55 | 0x05,0x05,0x05,0x05,0x05,0x05,0x02,0x06,0x06,0x06, //4 5 6 7 8 9 : ; < = 56 | 0x06,0x06,0x06,0x03,0x03,0x03,0x03,0x03,0x03,0x03, //> ? @ A B C D E F G 57 | 0x03,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, //H I J K L M N O P Q 58 | 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x06, //R S T U V W X Y Z [ 59 | 0x06,0x06,0x06,0x06,0x06,0x03,0x03,0x03,0x03,0x03, //\ ] ^ _ ` a b c d e 60 | 0x03,0x03,0x03,0x01,0x02,0x03,0x01,0x03,0x03,0x03, //f g h i j k l m n o 61 | 0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, //p q r s t u v w x y 62 | 0x03,0x06,0x06,0x06,0x06,0x06, 63 | 64 | 65 | 66 | // font data 67 | 0x00,// (space) 68 | 0x3c, 0x7e, 0x52, 0x52, 0x7e, 0x3c,// ! 69 | 0x06, 0x00, 0x06,// " 70 | 0x7c, 0x28, 0x7c,// # 71 | 0x2c, 0x76, 0x24,// $ 72 | 0x62, 0x10, 0x4e,// % 73 | 0x3e, 0x2a, 0x7e,// & 74 | 0x06,// ' 75 | 0x18, 0x24, 0x42,// ( 76 | 0x42, 0x24, 0x18,// ) 77 | 0x0e, 0x0a, 0x0e,// * 78 | 0x10, 0x38, 0x10,// + 79 | 0x40, 0x20,// , 80 | 0x10, 0x10, 0x10,// - 81 | 0x60, 0x60, // . 82 | 0x60, 0x18, 0x06,// / 83 | 0x3e, 0x7e, 0x42, 0x7e, 0x7c, //0 84 | 0x00, 0x3e, 0x7c, 0x00, 0x00, //1 85 | 0x32, 0x72, 0x52, 0x5e, 0x5c, //2 86 | 0x42, 0x52, 0x52, 0x7e, 0x7c, //3 87 | 0x0e, 0x1e, 0x10, 0x3e, 0x7c, //4 88 | 0x4e, 0x5e, 0x52, 0x72, 0x72, //5 89 | 0x3e, 0x7e, 0x4a, 0x7a, 0x7a, //6 90 | 0x02, 0x02, 0x02, 0x3e, 0x7c, //7 91 | 0x3e, 0x7e, 0x52, 0x7e, 0x7c, //8 92 | 0x4e, 0x5e, 0x52, 0x7e, 0x7c, //9 93 | 0x2c, 0x68,// : 94 | 0x00, 0x36, 0x36, 0x76, 0x74, 0x00,// ; 95 | 0x1c, 0x3e, 0x36, 0x36, 0x36, 0x34,// < 96 | 0x16, 0x36, 0x36, 0x36, 0x36, 0x34,// = 97 | 0x16, 0x36, 0x36, 0x36, 0x3e, 0x1c,// > 98 | 0x03, 0x07, 0x03, 0x5b, 0x5f, 0x0e,// ? 99 | 0x7f, 0x41, 0x5d, 0x55, 0x5d, 0x7d,// @ 100 | 0x7c, 0x12, 0x7c,// A 101 | 0x7e, 0x52, 0x7e,// B 102 | 0x7e, 0x42, 0x42,// C 103 | 0x7e, 0x42, 0x3e,// D 104 | 0x7e, 0x52, 0x52,// E 105 | 0x7e, 0x12, 0x12,// F 106 | 0x7e, 0x42, 0x72,// G 107 | 0x7e, 0x10, 0x7e,// H 108 | 0x7e, // I 109 | 0x40, 0x42, 0x7e,// J 110 | 0x7e, 0x10, 0x6e,// K 111 | 0x7e, 0x40, 0x40,// L 112 | 0x7e, 0x04, 0x7e,// M 113 | 0x7e, 0x02, 0x7e,// N 114 | 0x7e, 0x42, 0x7e,// O 115 | 0x7e, 0x12, 0x1e,// P 116 | 0x3e, 0x22, 0x7e,// Q 117 | 0x7e, 0x12, 0x6e,// R 118 | 0x4e, 0x4a, 0x7a,// S 119 | 0x02, 0x7e, 0x02,// T 120 | 0x7e, 0x40, 0x7e,// U 121 | 0x3e, 0x40, 0x3e,// V 122 | 0x7e, 0x20, 0x7e,// W 123 | 0x76, 0x08, 0x76,// X 124 | 0x1e, 0x70, 0x1e,// Y 125 | 0x72, 0x4a, 0x46,// Z 126 | 0x1c, 0x3c, 0x3c, 0x3c, 0x3c, 0x38,// [ 127 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// "\" 128 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// ] 129 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// ^ 130 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// _ 131 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// ` 132 | 0x3c, 0x24, 0x7c,// a 133 | 0x7e, 0x44, 0x7c,// b 134 | 0x7c, 0x44, 0x44,// c 135 | 0x7c, 0x44, 0x7e,// d 136 | 0x7c, 0x54, 0x5c,// e 137 | 0x7c, 0x14, 0x04,// f 138 | 0x3c, 0xa4, 0xfc,// g 139 | 0x7e, 0x04, 0x7c,// h 140 | 0x7c, // i 141 | 0x80, 0xfc, // j 142 | 0x7e, 0x10, 0x6c,// k 143 | 0x7e, // l 144 | 0x7c, 0x08, 0x7c,// m 145 | 0x7c, 0x04, 0x7c,// n 146 | 0x7c, 0x44, 0x7c,// o 147 | 0xfc, 0x44, 0x7c,// p 148 | 0x7c, 0x44, 0xfc,// q 149 | 0x7c, 0x04, 0x04,// r 150 | 0x5c, 0x54, 0x74,// s 151 | 0x7e, 0x44, 0x40,// t 152 | 0x7c, 0x40, 0x7c,// u 153 | 0x3c, 0x40, 0x3c,// v 154 | 0x7c, 0x20, 0x7c,// w 155 | 0x6c, 0x10, 0x6c,// x 156 | 0x1c, 0x70, 0x1c,// y 157 | 0x64, 0x54, 0x4c,// z 158 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// { 159 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// | 160 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// } 161 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e,// -> 162 | 0x3e, 0x3e, 0x26, 0x26, 0x7e, 0x7e // <- 163 | 164 | 165 | 166 | // font data | 167 | 168 | 169 | }; 170 | 171 | #endif 172 | -------------------------------------------------------------------------------- /ArduinoNano/JadwalSholat-P10-1Panel/fonts/SystemFont5x7.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * System5x7 4 | * 5 | * 6 | * File Name : System5x7.h 7 | * Date : 28 Oct 2008 8 | * Font size in bytes : 470 9 | * Font width : 5 10 | * Font height : 7 11 | * Font first char : 32 12 | * Font last char : 127 13 | * Font used chars : 94 14 | * 15 | * The font data are defined as 16 | * 17 | * struct _FONT_ { 18 | * uint16_t font_Size_in_Bytes_over_all_included_Size_it_self; 19 | * uint8_t font_Width_in_Pixel_for_fixed_drawing; 20 | * uint8_t font_Height_in_Pixel_for_all_characters; 21 | * unit8_t font_First_Char; 22 | * uint8_t font_Char_Count; 23 | * 24 | * uint8_t font_Char_Widths[font_Last_Char - font_First_Char +1]; 25 | * // for each character the separate width in pixels, 26 | * // characters < 128 have an implicit virtual right empty row 27 | * 28 | * uint8_t font_data[]; 29 | * // bit field of all characters 30 | */ 31 | 32 | #include 33 | #if (defined(__AVR__)) 34 | #include 35 | #else 36 | #include 37 | #endif 38 | 39 | #ifndef SYSTEM5x7_H 40 | #define SYSTEM5x7_H 41 | 42 | #define SYSTEM5x7_WIDTH 5 43 | #define SYSTEM5x7_HEIGHT 7 44 | 45 | /* 46 | * added to allow fontname to match header file name. 47 | * as well as keep the old name for backward compability 48 | */ 49 | 50 | #define SystemFont5x7 System5x7 51 | 52 | const static uint8_t System5x7[] PROGMEM = { 53 | 0x0, 0x0, // size of zero indicates fixed width font, actual length is width * height 54 | 0x05, // width 55 | 0x07, // height 56 | 0x20, // first char 57 | 0x60, // char count 58 | 59 | // Fixed width; char width table not used !!!! 60 | 61 | // font data 62 | 0x00, 0x00, 0x00, 0x00, 0x00,// (space) 63 | 0x00, 0x00, 0x5F, 0x00, 0x00,// ! 64 | 0x00, 0x07, 0x00, 0x07, 0x00,// " 65 | 0x14, 0x7F, 0x14, 0x7F, 0x14,// # 66 | 0x24, 0x2A, 0x7F, 0x2A, 0x12,// $ 67 | 0x23, 0x13, 0x08, 0x64, 0x62,// % 68 | 0x36, 0x49, 0x55, 0x22, 0x50,// & 69 | 0x00, 0x05, 0x03, 0x00, 0x00,// ' 70 | 0x00, 0x1C, 0x22, 0x41, 0x00,// ( 71 | 0x00, 0x41, 0x22, 0x1C, 0x00,// ) 72 | 0x08, 0x2A, 0x1C, 0x2A, 0x08,// * 73 | 0x08, 0x08, 0x3E, 0x08, 0x08,// + 74 | 0x00, 0x50, 0x30, 0x00, 0x00,// , 75 | 0x08, 0x08, 0x08, 0x08, 0x08,// - 76 | 0x00, 0x60, 0x60, 0x00, 0x00,// . 77 | 0x20, 0x10, 0x08, 0x04, 0x02,// / 78 | 0x3E, 0x51, 0x49, 0x45, 0x3E,// 0 79 | 0x00, 0x42, 0x7F, 0x40, 0x00,// 1 80 | 0x42, 0x61, 0x51, 0x49, 0x46,// 2 81 | 0x21, 0x41, 0x45, 0x4B, 0x31,// 3 82 | 0x18, 0x14, 0x12, 0x7F, 0x10,// 4 83 | 0x27, 0x45, 0x45, 0x45, 0x39,// 5 84 | 0x3C, 0x4A, 0x49, 0x49, 0x30,// 6 85 | 0x01, 0x71, 0x09, 0x05, 0x03,// 7 86 | 0x36, 0x49, 0x49, 0x49, 0x36,// 8 87 | 0x06, 0x49, 0x49, 0x29, 0x1E,// 9 88 | 0x00, 0x36, 0x36, 0x00, 0x00,// : 89 | 0x00, 0x56, 0x36, 0x00, 0x00,// ; 90 | 0x00, 0x08, 0x14, 0x22, 0x41,// < 91 | 0x14, 0x14, 0x14, 0x14, 0x14,// = 92 | 0x41, 0x22, 0x14, 0x08, 0x00,// > 93 | 0x02, 0x01, 0x51, 0x09, 0x06,// ? 94 | 0x32, 0x49, 0x79, 0x41, 0x3E,// @ 95 | 0x7E, 0x11, 0x11, 0x11, 0x7E,// A 96 | 0x7F, 0x49, 0x49, 0x49, 0x36,// B 97 | 0x3E, 0x41, 0x41, 0x41, 0x22,// C 98 | 0x7F, 0x41, 0x41, 0x22, 0x1C,// D 99 | 0x7F, 0x49, 0x49, 0x49, 0x41,// E 100 | 0x7F, 0x09, 0x09, 0x01, 0x01,// F 101 | 0x3E, 0x41, 0x41, 0x51, 0x32,// G 102 | 0x7F, 0x08, 0x08, 0x08, 0x7F,// H 103 | 0x00, 0x41, 0x7F, 0x41, 0x00,// I 104 | 0x20, 0x40, 0x41, 0x3F, 0x01,// J 105 | 0x7F, 0x08, 0x14, 0x22, 0x41,// K 106 | 0x7F, 0x40, 0x40, 0x40, 0x40,// L 107 | 0x7F, 0x02, 0x04, 0x02, 0x7F,// M 108 | 0x7F, 0x04, 0x08, 0x10, 0x7F,// N 109 | 0x3E, 0x41, 0x41, 0x41, 0x3E,// O 110 | 0x7F, 0x09, 0x09, 0x09, 0x06,// P 111 | 0x3E, 0x41, 0x51, 0x21, 0x5E,// Q 112 | 0x7F, 0x09, 0x19, 0x29, 0x46,// R 113 | 0x46, 0x49, 0x49, 0x49, 0x31,// S 114 | 0x01, 0x01, 0x7F, 0x01, 0x01,// T 115 | 0x3F, 0x40, 0x40, 0x40, 0x3F,// U 116 | 0x1F, 0x20, 0x40, 0x20, 0x1F,// V 117 | 0x7F, 0x20, 0x18, 0x20, 0x7F,// W 118 | 0x63, 0x14, 0x08, 0x14, 0x63,// X 119 | 0x03, 0x04, 0x78, 0x04, 0x03,// Y 120 | 0x61, 0x51, 0x49, 0x45, 0x43,// Z 121 | 0x00, 0x00, 0x7F, 0x41, 0x41,// [ 122 | 0x02, 0x04, 0x08, 0x10, 0x20,// "\" 123 | 0x41, 0x41, 0x7F, 0x00, 0x00,// ] 124 | 0x04, 0x02, 0x01, 0x02, 0x04,// ^ 125 | 0x40, 0x40, 0x40, 0x40, 0x40,// _ 126 | 0x00, 0x01, 0x02, 0x04, 0x00,// ` 127 | 0x20, 0x54, 0x54, 0x54, 0x78,// a 128 | 0x7F, 0x48, 0x44, 0x44, 0x38,// b 129 | 0x38, 0x44, 0x44, 0x44, 0x20,// c 130 | 0x38, 0x44, 0x44, 0x48, 0x7F,// d 131 | 0x38, 0x54, 0x54, 0x54, 0x18,// e 132 | 0x08, 0x7E, 0x09, 0x01, 0x02,// f 133 | 0x08, 0x14, 0x54, 0x54, 0x3C,// g 134 | 0x7F, 0x08, 0x04, 0x04, 0x78,// h 135 | 0x00, 0x44, 0x7D, 0x40, 0x00,// i 136 | 0x20, 0x40, 0x44, 0x3D, 0x00,// j 137 | 0x00, 0x7F, 0x10, 0x28, 0x44,// k 138 | 0x00, 0x41, 0x7F, 0x40, 0x00,// l 139 | 0x7C, 0x04, 0x18, 0x04, 0x78,// m 140 | 0x7C, 0x08, 0x04, 0x04, 0x78,// n 141 | 0x38, 0x44, 0x44, 0x44, 0x38,// o 142 | 0x7C, 0x14, 0x14, 0x14, 0x08,// p 143 | 0x08, 0x14, 0x14, 0x18, 0x7C,// q 144 | 0x7C, 0x08, 0x04, 0x04, 0x08,// r 145 | 0x48, 0x54, 0x54, 0x54, 0x20,// s 146 | 0x04, 0x3F, 0x44, 0x40, 0x20,// t 147 | 0x3C, 0x40, 0x40, 0x20, 0x7C,// u 148 | 0x1C, 0x20, 0x40, 0x20, 0x1C,// v 149 | 0x3C, 0x40, 0x30, 0x40, 0x3C,// w 150 | 0x44, 0x28, 0x10, 0x28, 0x44,// x 151 | 0x0C, 0x50, 0x50, 0x50, 0x3C,// y 152 | 0x44, 0x64, 0x54, 0x4C, 0x44,// z 153 | 0x00, 0x08, 0x36, 0x41, 0x00,// { 154 | 0x00, 0x00, 0x7F, 0x00, 0x00,// | 155 | 0x00, 0x41, 0x36, 0x08, 0x00,// } 156 | 0x08, 0x08, 0x2A, 0x1C, 0x08,// -> 157 | 0x08, 0x1C, 0x2A, 0x08, 0x08 // <- 158 | 159 | }; 160 | 161 | #endif 162 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-19/MembuatJWS-19.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * JADWAL WAKTU SHOLAT MENGGUNAKAN NODEMCU ESP8266, LED P10, RTC DS3231, BUZZER 3 | * FITUR : JADWAL SHOLAT 5 WAKTU DAN TANBIH IMSAK, JAM BESAR, TANGGAL, SUHU, ALARAM ADZAN DAN TANBIH IMSAK, 4 | * DAN HITUNG MUNDUR IQOMAH DAN UBAH WAKTU LEWAT WIFI DENGAN BROWSER. 5 | * 6 | 7 | Pin on DMD P10 GPIO NODEMCU Pin on DS3231 NODEMCU Pin on Buzzer NODEMCU 8 | 2 A GPIO16 D0 SCL D1 (GPIO 5) + RX (GPIO 3) 9 | 4 B GPIO12 D6 SDA D2 (GPIO 4) - GND 10 | 8 CLK GPIO14 D5 VCC 3V 11 | 10 SCK GPIO0 D3 GND GND 12 | 12 R GPIO13 D7 13 | 1 NOE GPIO15 D8 14 | 3 GND GND GND 15 | 16 | Catatan : 17 | o Perlu Power Eksternal 5V ke LED P10. 18 | o Saat Flashing (upload program) cabut sementara pin untuk buzzer. 19 | 20 | Project Git 21 | - https://github.com/busel7/Arduino 22 | 23 | Eksternal Library 24 | - DMDESP : https://github.com/busel7/DMDESP 25 | - PrayerTime : https://github.com/asmaklad/Arduino-Prayer-Times 26 | - RTC DS3231 : https://github.com/Makuna/Rtc 27 | - ArduinoJson V6 : https://github.com/bblanchon/ArduinoJson 28 | 29 | Diskusi Grup Untuk1000Masjid : https://www.facebook.com/groups/761058907424496/ 30 | 31 | Tools : http://dotmatrixtool.com 32 | 33 | www.grobak.net - www.elektronmart.com 34 | 35 | Updated : 9 Mei 2020 36 | */ 37 | 38 | #include 39 | #include 40 | 41 | #include 42 | #include 43 | RtcDS3231 Rtc(Wire); 44 | 45 | #include 46 | 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | 54 | 55 | #include 56 | #include "Display.h" 57 | #include "Buzzer.h" 58 | #include "RTC.h" 59 | #include "FSConfig.h" 60 | #include "WebServer.h" 61 | #include "WebPage.h" 62 | #include "JWS.h" 63 | 64 | 65 | 66 | //---------------------------------------------------------------------- 67 | // SETUP 68 | 69 | void setup() { 70 | 71 | Serial.begin(115200); 72 | 73 | //Buzzer 74 | pinMode(buzzer, OUTPUT); 75 | digitalWrite(buzzer, LOW); 76 | delay(50); 77 | 78 | //RTC 79 | mulaiRTC(); 80 | 81 | //WIFI 82 | 83 | pinMode(pin_led, OUTPUT); 84 | 85 | wifiConnect(); 86 | 87 | server.on("/", []() { 88 | server.send_P(200, "text/html", setwaktu); 89 | 90 | // Kalau ada perubahan tanggal 91 | if (server.hasArg("date")) { 92 | 93 | uint16_t jam; 94 | uint8_t menit; 95 | uint8_t detik; 96 | String sd=server.arg("date"); 97 | String lastSd; 98 | 99 | jam = ((sd[0]-'0')*1000)+((sd[1]-'0')*100)+((sd[2]-'0')*10)+(sd[3]-'0'); 100 | menit = ((sd[5]-'0')*10)+(sd[6]-'0'); 101 | detik = ((sd[8]-'0')*10)+(sd[9]-'0'); 102 | 103 | if (sd != lastSd){ 104 | RtcDateTime now = Rtc.GetDateTime(); 105 | uint8_t hour = now.Hour(); 106 | uint8_t minute = now.Minute(); 107 | Rtc.SetDateTime(RtcDateTime(jam, menit, detik, hour, minute, 0)); 108 | lastSd=sd; 109 | } 110 | 111 | BacaRTC(); 112 | 113 | server.send ( 404 ,"text", message ); 114 | 115 | } 116 | 117 | // Kalau ada perubahaan jam 118 | if (server.hasArg("time")) { 119 | 120 | String st=server.arg("time"); 121 | String lastSt; 122 | uint8_t jam = ((st[0]-'0')*10)+(st[1]-'0'); 123 | uint8_t menit = ((st[3]-'0')*10)+(st[4]-'0'); 124 | 125 | if (st != lastSt){ 126 | RtcDateTime now = Rtc.GetDateTime(); 127 | uint16_t year = now.Year(); 128 | uint8_t month = now.Month(); 129 | uint8_t day = now.Day(); 130 | Rtc.SetDateTime(RtcDateTime(year, month, day, jam, menit, 0)); 131 | lastSt=st; 132 | } 133 | 134 | BacaRTC(); 135 | 136 | server.send ( 404 ,"text", message ); 137 | 138 | } 139 | }); 140 | 141 | 142 | server.on ( "/xml", handleXML) ; // http://192.168.4.1/xml 143 | 144 | server.begin(); 145 | Serial.println("HTTP server started"); 146 | 147 | //DMD 148 | Disp.start(); 149 | Disp.setBrightness(20); 150 | 151 | UpdateWaktu(); 152 | 153 | 154 | } 155 | 156 | 157 | 158 | 159 | //---------------------------------------------------------------------- 160 | // LOOP 161 | 162 | void loop() { 163 | 164 | server.handleClient(); 165 | 166 | switch(tmputama) { 167 | 168 | case 0 : 169 | tampiljws(); 170 | break; 171 | 172 | case 1 : 173 | TampilAdzan(); 174 | break; 175 | 176 | case 2 : 177 | Iqomah(); 178 | break; 179 | 180 | } 181 | 182 | Disp.loop(); 183 | UpdateWaktu(); 184 | AlarmSholat(); 185 | 186 | } 187 | 188 | 189 | 190 | void tampiljws() { 191 | 192 | switch(tmpjws) { 193 | 194 | case 0 : 195 | animLogoX(); 196 | break; 197 | 198 | case 1 : 199 | JamBesar(1); 200 | tampilinfo(); 201 | break; 202 | 203 | case 2 : 204 | TeksBerjalanKananKiri(); 205 | break; 206 | 207 | } 208 | 209 | } 210 | 211 | 212 | 213 | void tampilinfo() { 214 | 215 | switch(tmpinfo) { 216 | 217 | case 0 : 218 | TampilTanggal(); 219 | break; 220 | 221 | case 1 : 222 | TampilSuhu(); 223 | break; 224 | 225 | case 2 : 226 | TampilJadwalSholat(); 227 | break; 228 | 229 | } 230 | 231 | } 232 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-1Panel/libraries/HJS589/Bitmap.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------------------------------------------------- 2 | 3 | DMD.cpp - Function and support library for the Freetronics DMD, a 512 LED matrix display 4 | panel arranged in a 32 x 16 layout. 5 | 6 | Copyright (C) 2011 Marc Alexander (info freetronics com) 7 | 8 | Note that the DMD library uses the SPI port for the fastest, low overhead writing to the 9 | display. Keep an eye on conflicts if there are any other devices running from the same 10 | SPI port, and that the chip select on those devices is correctly set to be inactive 11 | when the DMD is being written to. 12 | 13 | --- 14 | 15 | This program is free software: you can redistribute it and/or modify it under the terms 16 | of the version 3 GNU General Public License as published by the Free Software Foundation. 17 | 18 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 19 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | See the GNU General Public License for more details. 21 | 22 | You should have received a copy of the GNU General Public License along with this program. 23 | If not, see . 24 | 25 | --------------------------------------------------------------------------------------*/ 26 | 27 | 28 | 29 | 30 | 31 | 32 | #ifndef Bitmap_h 33 | #define Bitmap_h 34 | 35 | #include 36 | #include 37 | 38 | class HJS589; 39 | class String; 40 | 41 | class Bitmap 42 | { 43 | public: 44 | Bitmap(int width, int height); 45 | ~Bitmap(); 46 | 47 | bool isValid() const { return fb != 0; } 48 | 49 | typedef uint8_t Color; 50 | typedef PGM_VOID_P ProgMem; 51 | typedef PGM_VOID_P Font; 52 | 53 | static const Color Black = 0; 54 | static const Color White = 1; 55 | static const Color NoFill = 2; 56 | 57 | int width() const { return _width; } 58 | int height() const { return _height; } 59 | int stride() const { return _stride; } 60 | int bitsPerPixel() const { return 1; } 61 | 62 | uint8_t *data() { return fb; } 63 | const uint8_t *data() const { return fb; } 64 | 65 | void clear(Color color = Black); 66 | Color pixel(int x, int y) const; 67 | void setPixel(int x, int y, Color color); 68 | 69 | void drawLine(int x1, int y1, int x2, int y2, Color color = White); 70 | void drawRect(int x1, int y1, int x2, int y2, Color borderColor = White, Color fillColor = NoFill); 71 | void drawFilledRect(int x1, int y1, int x2, int y2, Color color = White); 72 | void drawCircle(int centerX, int centerY, int radius, Color borderColor = White, Color fillColor = NoFill); 73 | void drawFilledCircle(int centerX, int centerY, int radius, Color color = White); 74 | 75 | void drawBitmap(int x, int y, const Bitmap &bitmap, Color color = White); 76 | void drawBitmap(int x, int y, Bitmap::ProgMem bitmap, Color color = White); 77 | void drawInvertedBitmap(int x, int y, const Bitmap &bitmap); 78 | void drawInvertedBitmap(int x, int y, Bitmap::ProgMem bitmap); 79 | 80 | Font font() const { return _font; } 81 | void setFont(Font font) { _font = font; } 82 | 83 | Color textColor() const { return _textColor; } 84 | void setTextColor(Color color) { _textColor = color; } 85 | 86 | void drawText(int x, int y, const char *str, int len = -1); 87 | void drawText(int x, int y, const String &str, int start = 0, int len = -1); 88 | 89 | int drawChar(int x, int y, char ch); 90 | 91 | int charWidth(char ch) const; 92 | int textWidth(const char *str, int len = -1) const; 93 | int textWidth(const String &str, int start = 0, int len = -1) const; 94 | int textHeight() const; 95 | 96 | void copy(int x, int y, int width, int height, Bitmap *dest, int destX, int destY); 97 | void fill(int x, int y, int width, int height, Color color); 98 | void fill(int x, int y, int width, int height, Bitmap::ProgMem pattern, Color color = White); 99 | 100 | void scroll(int dx, int dy, Color fillColor = Black); 101 | void scroll(int x, int y, int width, int height, int dx, int dy, Color fillColor = Black); 102 | 103 | void invert(int x, int y, int width, int height); 104 | 105 | 106 | //.............................................................. 107 | 108 | 109 | //.............................................................. 110 | 111 | private: 112 | // Disable copy constructor and operator=(). 113 | Bitmap(const Bitmap &) {} 114 | Bitmap &operator=(const Bitmap &) { return *this; } 115 | 116 | int _width; 117 | int _height; 118 | int _stride; 119 | uint8_t *fb; 120 | Font _font; 121 | Color _textColor; 122 | //.............................................................. 123 | //.............................................................. 124 | friend class HJS589; 125 | 126 | void blit(int x1, int y1, int x2, int y2, int x3, int y3); 127 | void drawCirclePoints(int centerX, int centerY, int radius, int x, int y, Color borderColor, Color fillColor); 128 | }; 129 | 130 | inline void Bitmap::drawFilledRect(int x1, int y1, int x2, int y2, Color color) 131 | { 132 | drawRect(x1, y1, x2, y2, color, color); 133 | } 134 | 135 | inline void Bitmap::drawFilledCircle(int centerX, int centerY, int radius, Color color) 136 | { 137 | drawCircle(centerX, centerY, radius, color, color); 138 | } 139 | 140 | inline void Bitmap::drawInvertedBitmap(int x, int y, const Bitmap &bitmap) 141 | { 142 | drawBitmap(x, y, bitmap, Black); 143 | } 144 | 145 | inline void Bitmap::drawInvertedBitmap(int x, int y, Bitmap::ProgMem bitmap) 146 | { 147 | drawBitmap(x, y, bitmap, Black); 148 | } 149 | 150 | inline void Bitmap::scroll(int dx, int dy, Color fillColor) 151 | { 152 | scroll(0, 0, _width, _height, dx, dy, fillColor); 153 | } 154 | 155 | #endif 156 | -------------------------------------------------------------------------------- /NodeMCU/JadwalSholat-P10-2Panel/libraries/HJS589/Bitmap.h: -------------------------------------------------------------------------------- 1 | /*-------------------------------------------------------------------------------------- 2 | 3 | DMD.cpp - Function and support library for the Freetronics DMD, a 512 LED matrix display 4 | panel arranged in a 32 x 16 layout. 5 | 6 | Copyright (C) 2011 Marc Alexander (info freetronics com) 7 | 8 | Note that the DMD library uses the SPI port for the fastest, low overhead writing to the 9 | display. Keep an eye on conflicts if there are any other devices running from the same 10 | SPI port, and that the chip select on those devices is correctly set to be inactive 11 | when the DMD is being written to. 12 | 13 | --- 14 | 15 | This program is free software: you can redistribute it and/or modify it under the terms 16 | of the version 3 GNU General Public License as published by the Free Software Foundation. 17 | 18 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 19 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | See the GNU General Public License for more details. 21 | 22 | You should have received a copy of the GNU General Public License along with this program. 23 | If not, see . 24 | 25 | --------------------------------------------------------------------------------------*/ 26 | 27 | 28 | 29 | 30 | 31 | 32 | #ifndef Bitmap_h 33 | #define Bitmap_h 34 | 35 | #include 36 | #include 37 | 38 | class HJS589; 39 | class String; 40 | 41 | class Bitmap 42 | { 43 | public: 44 | Bitmap(int width, int height); 45 | ~Bitmap(); 46 | 47 | bool isValid() const { return fb != 0; } 48 | 49 | typedef uint8_t Color; 50 | typedef PGM_VOID_P ProgMem; 51 | typedef PGM_VOID_P Font; 52 | 53 | static const Color Black = 0; 54 | static const Color White = 1; 55 | static const Color NoFill = 2; 56 | 57 | int width() const { return _width; } 58 | int height() const { return _height; } 59 | int stride() const { return _stride; } 60 | int bitsPerPixel() const { return 1; } 61 | 62 | uint8_t *data() { return fb; } 63 | const uint8_t *data() const { return fb; } 64 | 65 | void clear(Color color = Black); 66 | Color pixel(int x, int y) const; 67 | void setPixel(int x, int y, Color color); 68 | 69 | void drawLine(int x1, int y1, int x2, int y2, Color color = White); 70 | void drawRect(int x1, int y1, int x2, int y2, Color borderColor = White, Color fillColor = NoFill); 71 | void drawFilledRect(int x1, int y1, int x2, int y2, Color color = White); 72 | void drawCircle(int centerX, int centerY, int radius, Color borderColor = White, Color fillColor = NoFill); 73 | void drawFilledCircle(int centerX, int centerY, int radius, Color color = White); 74 | 75 | void drawBitmap(int x, int y, const Bitmap &bitmap, Color color = White); 76 | void drawBitmap(int x, int y, Bitmap::ProgMem bitmap, Color color = White); 77 | void drawInvertedBitmap(int x, int y, const Bitmap &bitmap); 78 | void drawInvertedBitmap(int x, int y, Bitmap::ProgMem bitmap); 79 | 80 | Font font() const { return _font; } 81 | void setFont(Font font) { _font = font; } 82 | 83 | Color textColor() const { return _textColor; } 84 | void setTextColor(Color color) { _textColor = color; } 85 | 86 | void drawText(int x, int y, const char *str, int len = -1); 87 | void drawText(int x, int y, const String &str, int start = 0, int len = -1); 88 | 89 | int drawChar(int x, int y, char ch); 90 | 91 | int charWidth(char ch) const; 92 | int textWidth(const char *str, int len = -1) const; 93 | int textWidth(const String &str, int start = 0, int len = -1) const; 94 | int textHeight() const; 95 | 96 | void copy(int x, int y, int width, int height, Bitmap *dest, int destX, int destY); 97 | void fill(int x, int y, int width, int height, Color color); 98 | void fill(int x, int y, int width, int height, Bitmap::ProgMem pattern, Color color = White); 99 | 100 | void scroll(int dx, int dy, Color fillColor = Black); 101 | void scroll(int x, int y, int width, int height, int dx, int dy, Color fillColor = Black); 102 | 103 | void invert(int x, int y, int width, int height); 104 | 105 | 106 | //.............................................................. 107 | 108 | 109 | //.............................................................. 110 | 111 | private: 112 | // Disable copy constructor and operator=(). 113 | Bitmap(const Bitmap &) {} 114 | Bitmap &operator=(const Bitmap &) { return *this; } 115 | 116 | int _width; 117 | int _height; 118 | int _stride; 119 | uint8_t *fb; 120 | Font _font; 121 | Color _textColor; 122 | //.............................................................. 123 | //.............................................................. 124 | friend class HJS589; 125 | 126 | void blit(int x1, int y1, int x2, int y2, int x3, int y3); 127 | void drawCirclePoints(int centerX, int centerY, int radius, int x, int y, Color borderColor, Color fillColor); 128 | }; 129 | 130 | inline void Bitmap::drawFilledRect(int x1, int y1, int x2, int y2, Color color) 131 | { 132 | drawRect(x1, y1, x2, y2, color, color); 133 | } 134 | 135 | inline void Bitmap::drawFilledCircle(int centerX, int centerY, int radius, Color color) 136 | { 137 | drawCircle(centerX, centerY, radius, color, color); 138 | } 139 | 140 | inline void Bitmap::drawInvertedBitmap(int x, int y, const Bitmap &bitmap) 141 | { 142 | drawBitmap(x, y, bitmap, Black); 143 | } 144 | 145 | inline void Bitmap::drawInvertedBitmap(int x, int y, Bitmap::ProgMem bitmap) 146 | { 147 | drawBitmap(x, y, bitmap, Black); 148 | } 149 | 150 | inline void Bitmap::scroll(int dx, int dy, Color fillColor) 151 | { 152 | scroll(0, 0, _width, _height, dx, dy, fillColor); 153 | } 154 | 155 | #endif 156 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-20/MembuatJWS-20.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * JADWAL WAKTU SHOLAT MENGGUNAKAN NODEMCU ESP8266, LED P10, RTC DS3231, BUZZER 3 | * FITUR : JADWAL SHOLAT 5 WAKTU DAN TANBIH IMSAK, JAM BESAR, TANGGAL, SUHU, ALARAM ADZAN DAN TANBIH IMSAK, 4 | * DAN HITUNG MUNDUR IQOMAH DAN UBAH WAKTU LEWAT WIFI DENGAN BROWSER. 5 | * 6 | 7 | Pin on DMD P10 GPIO NODEMCU Pin on DS3231 NODEMCU Pin on Buzzer NODEMCU 8 | 2 A GPIO16 D0 SCL D1 (GPIO 5) + RX (GPIO 3) 9 | 4 B GPIO12 D6 SDA D2 (GPIO 4) - GND 10 | 8 CLK GPIO14 D5 VCC 3V 11 | 10 SCK GPIO0 D3 GND GND 12 | 12 R GPIO13 D7 13 | 1 NOE GPIO15 D8 14 | 3 GND GND GND 15 | 16 | Catatan : 17 | o Perlu Power Eksternal 5V ke LED P10. 18 | o Saat Flashing (upload program) cabut sementara pin untuk buzzer. 19 | 20 | Project Git 21 | - https://github.com/busel7/Arduino 22 | 23 | Eksternal Library 24 | - DMDESP : https://github.com/busel7/DMDESP 25 | - PrayerTime : https://github.com/asmaklad/Arduino-Prayer-Times 26 | - RTC DS3231 : https://github.com/Makuna/Rtc 27 | - ArduinoJson V6 : https://github.com/bblanchon/ArduinoJson 28 | 29 | Diskusi Grup Untuk1000Masjid : https://www.facebook.com/groups/761058907424496/ 30 | 31 | Tools : http://dotmatrixtool.com 32 | 33 | www.grobak.net - www.elektronmart.com 34 | 35 | Updated : 10 Mei 2020 36 | */ 37 | 38 | #include 39 | #include 40 | 41 | #include 42 | #include 43 | RtcDS3231 Rtc(Wire); 44 | 45 | #include 46 | 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | 54 | 55 | #include 56 | #include "Display.h" 57 | #include "Buzzer.h" 58 | #include "RTC.h" 59 | #include "FSConfig.h" 60 | #include "WebServer.h" 61 | #include "WebPage.h" 62 | #include "JWS.h" 63 | 64 | 65 | 66 | //---------------------------------------------------------------------- 67 | // SETUP 68 | 69 | void setup() { 70 | 71 | Serial.begin(115200); 72 | 73 | //Buzzer 74 | pinMode(buzzer, OUTPUT); 75 | digitalWrite(buzzer, LOW); 76 | delay(50); 77 | 78 | //RTC 79 | mulaiRTC(); 80 | 81 | //WIFI 82 | 83 | pinMode(pin_led, OUTPUT); 84 | 85 | wifiConnect(); 86 | 87 | server.on("/", []() { 88 | server.send_P(200, "text/html", setwaktu); 89 | 90 | // Kalau ada perubahan tanggal 91 | if (server.hasArg("date")) { 92 | 93 | uint16_t jam; 94 | uint8_t menit; 95 | uint8_t detik; 96 | String sd=server.arg("date"); 97 | String lastSd; 98 | 99 | jam = ((sd[0]-'0')*1000)+((sd[1]-'0')*100)+((sd[2]-'0')*10)+(sd[3]-'0'); 100 | menit = ((sd[5]-'0')*10)+(sd[6]-'0'); 101 | detik = ((sd[8]-'0')*10)+(sd[9]-'0'); 102 | 103 | if (sd != lastSd){ 104 | RtcDateTime now = Rtc.GetDateTime(); 105 | uint8_t hour = now.Hour(); 106 | uint8_t minute = now.Minute(); 107 | Rtc.SetDateTime(RtcDateTime(jam, menit, detik, hour, minute, 0)); 108 | lastSd=sd; 109 | } 110 | 111 | BacaRTC(); 112 | 113 | server.send ( 404 ,"text", message ); 114 | 115 | } 116 | 117 | // Kalau ada perubahaan jam 118 | if (server.hasArg("time")) { 119 | 120 | String st=server.arg("time"); 121 | String lastSt; 122 | uint8_t jam = ((st[0]-'0')*10)+(st[1]-'0'); 123 | uint8_t menit = ((st[3]-'0')*10)+(st[4]-'0'); 124 | 125 | if (st != lastSt){ 126 | RtcDateTime now = Rtc.GetDateTime(); 127 | uint16_t year = now.Year(); 128 | uint8_t month = now.Month(); 129 | uint8_t day = now.Day(); 130 | Rtc.SetDateTime(RtcDateTime(year, month, day, jam, menit, 0)); 131 | lastSt=st; 132 | } 133 | 134 | BacaRTC(); 135 | 136 | server.send ( 404 ,"text", message ); 137 | 138 | } 139 | }); 140 | 141 | 142 | server.on ( "/xml", handleXML) ; // http://192.168.4.1/xml 143 | 144 | server.begin(); 145 | Serial.println("HTTP server started"); 146 | 147 | //DMD 148 | Disp.start(); 149 | Disp.setBrightness(20); 150 | 151 | UpdateWaktu(); 152 | 153 | 154 | } 155 | 156 | 157 | 158 | 159 | //---------------------------------------------------------------------- 160 | // LOOP 161 | 162 | void loop() { 163 | 164 | server.handleClient(); 165 | 166 | switch(tmputama) { 167 | 168 | case 0 : 169 | tampiljws(); 170 | break; 171 | 172 | case 1 : 173 | TampilAdzan(); 174 | break; 175 | 176 | case 2 : 177 | Iqomah(); 178 | break; 179 | 180 | case 3 : 181 | TampilSaatSholat(); 182 | break; 183 | 184 | } 185 | 186 | Disp.loop(); 187 | UpdateWaktu(); 188 | AlarmSholat(); 189 | 190 | } 191 | 192 | 193 | 194 | void tampiljws() { 195 | 196 | switch(tmpjws) { 197 | 198 | case 0 : 199 | animLogoX(); 200 | break; 201 | 202 | case 1 : 203 | JamBesar(1); 204 | tampilinfo(); 205 | break; 206 | 207 | case 2 : 208 | TeksBerjalanKananKiri(); 209 | break; 210 | 211 | } 212 | 213 | } 214 | 215 | 216 | 217 | void tampilinfo() { 218 | 219 | switch(tmpinfo) { 220 | 221 | case 0 : 222 | TampilTanggal(); 223 | break; 224 | 225 | case 1 : 226 | TampilSuhu(); 227 | break; 228 | 229 | case 2 : 230 | TampilJadwalSholat(); 231 | break; 232 | 233 | } 234 | 235 | } 236 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-21/MembuatJWS-21.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * JADWAL WAKTU SHOLAT MENGGUNAKAN NODEMCU ESP8266, LED P10, RTC DS3231, BUZZER 3 | * FITUR : JADWAL SHOLAT 5 WAKTU DAN TANBIH IMSAK, JAM BESAR, TANGGAL, SUHU, ALARAM ADZAN DAN TANBIH IMSAK, 4 | * DAN HITUNG MUNDUR IQOMAH DAN UBAH WAKTU LEWAT WIFI DENGAN BROWSER. 5 | * 6 | 7 | Pin on DMD P10 GPIO NODEMCU Pin on DS3231 NODEMCU Pin on Buzzer NODEMCU 8 | 2 A GPIO16 D0 SCL D1 (GPIO 5) + RX (GPIO 3) 9 | 4 B GPIO12 D6 SDA D2 (GPIO 4) - GND 10 | 8 CLK GPIO14 D5 VCC 3V 11 | 10 SCK GPIO0 D3 GND GND 12 | 12 R GPIO13 D7 13 | 1 NOE GPIO15 D8 14 | 3 GND GND GND 15 | 16 | Catatan : 17 | o Perlu Power Eksternal 5V ke LED P10. 18 | o Saat Flashing (upload program) cabut sementara pin untuk buzzer. 19 | 20 | Project Git 21 | - https://github.com/busel7/Arduino 22 | 23 | Eksternal Library 24 | - DMDESP : https://github.com/busel7/DMDESP 25 | - PrayerTime : https://github.com/asmaklad/Arduino-Prayer-Times 26 | - RTC DS3231 : https://github.com/Makuna/Rtc 27 | - ArduinoJson V6 : https://github.com/bblanchon/ArduinoJson 28 | 29 | Diskusi Grup Untuk1000Masjid : https://www.facebook.com/groups/761058907424496/ 30 | 31 | Tools : http://dotmatrixtool.com 32 | 33 | www.grobak.net - www.elektronmart.com 34 | 35 | Updated : 11 Mei 2020 36 | */ 37 | 38 | #include 39 | #include 40 | #include 41 | 42 | #include 43 | #include 44 | RtcDS3231 Rtc(Wire); 45 | 46 | #include 47 | 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | #include 54 | 55 | 56 | #include 57 | #include "Display.h" 58 | #include "Buzzer.h" 59 | #include "RTC.h" 60 | #include "FSConfig.h" 61 | #include "WebServer.h" 62 | #include "WebPage.h" 63 | #include "JWS.h" 64 | 65 | 66 | 67 | //---------------------------------------------------------------------- 68 | // SETUP 69 | 70 | void setup() { 71 | 72 | Serial.begin(115200); 73 | 74 | //Buzzer 75 | pinMode(buzzer, OUTPUT); 76 | digitalWrite(buzzer, LOW); 77 | delay(50); 78 | 79 | //RTC 80 | mulaiRTC(); 81 | 82 | //WIFI 83 | 84 | pinMode(pin_led, OUTPUT); 85 | 86 | wifiConnect(); 87 | 88 | server.on("/", []() { 89 | server.send_P(200, "text/html", setwaktu); 90 | 91 | // Kalau ada perubahan tanggal 92 | if (server.hasArg("date")) { 93 | 94 | uint16_t jam; 95 | uint8_t menit; 96 | uint8_t detik; 97 | String sd=server.arg("date"); 98 | String lastSd; 99 | 100 | jam = ((sd[0]-'0')*1000)+((sd[1]-'0')*100)+((sd[2]-'0')*10)+(sd[3]-'0'); 101 | menit = ((sd[5]-'0')*10)+(sd[6]-'0'); 102 | detik = ((sd[8]-'0')*10)+(sd[9]-'0'); 103 | 104 | if (sd != lastSd){ 105 | RtcDateTime now = Rtc.GetDateTime(); 106 | uint8_t hour = now.Hour(); 107 | uint8_t minute = now.Minute(); 108 | Rtc.SetDateTime(RtcDateTime(jam, menit, detik, hour, minute, 0)); 109 | lastSd=sd; 110 | } 111 | 112 | BacaRTC(); 113 | 114 | server.send ( 404 ,"text", message ); 115 | 116 | } 117 | 118 | // Kalau ada perubahaan jam 119 | if (server.hasArg("time")) { 120 | 121 | String st=server.arg("time"); 122 | String lastSt; 123 | uint8_t jam = ((st[0]-'0')*10)+(st[1]-'0'); 124 | uint8_t menit = ((st[3]-'0')*10)+(st[4]-'0'); 125 | 126 | if (st != lastSt){ 127 | RtcDateTime now = Rtc.GetDateTime(); 128 | uint16_t year = now.Year(); 129 | uint8_t month = now.Month(); 130 | uint8_t day = now.Day(); 131 | Rtc.SetDateTime(RtcDateTime(year, month, day, jam, menit, 0)); 132 | lastSt=st; 133 | } 134 | 135 | BacaRTC(); 136 | 137 | server.send ( 404 ,"text", message ); 138 | 139 | } 140 | }); 141 | 142 | 143 | server.on ( "/xml", handleXML) ; // http://192.168.4.1/xml 144 | 145 | httpUpdater.setup(&server); 146 | server.begin(); 147 | Serial.println("HTTP server started"); 148 | 149 | //DMD 150 | Disp.start(); 151 | Disp.setBrightness(20); 152 | 153 | UpdateWaktu(); 154 | 155 | 156 | } 157 | 158 | 159 | 160 | 161 | //---------------------------------------------------------------------- 162 | // LOOP 163 | 164 | void loop() { 165 | 166 | server.handleClient(); 167 | 168 | switch(tmputama) { 169 | 170 | case 0 : 171 | tampiljws(); 172 | break; 173 | 174 | case 1 : 175 | TampilAdzan(); 176 | break; 177 | 178 | case 2 : 179 | Iqomah(); 180 | break; 181 | 182 | case 3 : 183 | TampilSaatSholat(); 184 | break; 185 | 186 | } 187 | 188 | Disp.loop(); 189 | UpdateWaktu(); 190 | AlarmSholat(); 191 | 192 | } 193 | 194 | 195 | 196 | void tampiljws() { 197 | 198 | switch(tmpjws) { 199 | 200 | case 0 : 201 | animLogoX(); 202 | break; 203 | 204 | case 1 : 205 | JamBesar(1); 206 | tampilinfo(); 207 | break; 208 | 209 | case 2 : 210 | TeksBerjalanKananKiri(); 211 | break; 212 | 213 | } 214 | 215 | } 216 | 217 | 218 | 219 | void tampilinfo() { 220 | 221 | switch(tmpinfo) { 222 | 223 | case 0 : 224 | TampilTanggal(); 225 | break; 226 | 227 | case 1 : 228 | TampilSuhu(); 229 | break; 230 | 231 | case 2 : 232 | TampilJadwalSholat(); 233 | break; 234 | 235 | } 236 | 237 | } 238 | -------------------------------------------------------------------------------- /MembuatJWS/MembuatJWS-18/MembuatJWS-18.ino: -------------------------------------------------------------------------------- 1 | /* 2 | * JADWAL WAKTU SHOLAT MENGGUNAKAN NODEMCU ESP8266, LED P10, RTC DS3231, BUZZER 3 | * FITUR : JADWAL SHOLAT 5 WAKTU DAN TANBIH IMSAK, JAM BESAR, TANGGAL, SUHU, ALARAM ADZAN DAN TANBIH IMSAK, 4 | * DAN HITUNG MUNDUR IQOMAH DAN UBAH WAKTU LEWAT WIFI DENGAN BROWSER. 5 | * 6 | 7 | Pin on DMD P10 GPIO NODEMCU Pin on DS3231 NODEMCU Pin on Buzzer NODEMCU 8 | 2 A GPIO16 D0 SCL D1 (GPIO 5) + RX (GPIO 3) 9 | 4 B GPIO12 D6 SDA D2 (GPIO 4) - GND 10 | 8 CLK GPIO14 D5 VCC 3V 11 | 10 SCK GPIO0 D3 GND GND 12 | 12 R GPIO13 D7 13 | 1 NOE GPIO15 D8 14 | 3 GND GND GND 15 | 16 | Catatan : 17 | o Perlu Power Eksternal 5V ke LED P10. 18 | o Saat Flashing (upload program) cabut sementara pin untuk buzzer. 19 | 20 | Project Git 21 | - https://github.com/busel7/Arduino 22 | 23 | Eksternal Library 24 | - DMDESP : https://github.com/busel7/DMDESP 25 | - PrayerTime : https://github.com/asmaklad/Arduino-Prayer-Times 26 | - RTC DS3231 : https://github.com/Makuna/Rtc 27 | - ArduinoJson V6 : https://github.com/bblanchon/ArduinoJson 28 | 29 | Diskusi Grup Untuk1000Masjid : https://www.facebook.com/groups/761058907424496/ 30 | 31 | Tools : http://dotmatrixtool.com 32 | 33 | www.grobak.net - www.elektronmart.com 34 | 35 | Updated : 9 Mei 2020 36 | */ 37 | 38 | #include 39 | #include 40 | 41 | #include 42 | #include 43 | RtcDS3231 Rtc(Wire); 44 | 45 | #include 46 | 47 | #include 48 | #include 49 | #include 50 | #include 51 | #include 52 | #include 53 | 54 | 55 | #include 56 | #include "Display.h" 57 | #include "Buzzer.h" 58 | #include "RTC.h" 59 | #include "FSConfig.h" 60 | #include "WebServer.h" 61 | #include "WebPage.h" 62 | #include "JWS.h" 63 | 64 | 65 | 66 | //---------------------------------------------------------------------- 67 | // SETUP 68 | 69 | void setup() { 70 | 71 | Serial.begin(115200); 72 | 73 | //Buzzer 74 | pinMode(buzzer, OUTPUT); 75 | digitalWrite(buzzer, LOW); 76 | delay(50); 77 | 78 | //RTC 79 | mulaiRTC(); 80 | 81 | //WIFI 82 | 83 | pinMode(pin_led, OUTPUT); 84 | 85 | wifiConnect(); 86 | 87 | server.on("/", []() { 88 | server.send_P(200, "text/html", setwaktu); 89 | 90 | // Kalau ada perubahan tanggal 91 | if (server.hasArg("date")) { 92 | 93 | uint16_t jam; 94 | uint8_t menit; 95 | uint8_t detik; 96 | String sd=server.arg("date"); 97 | String lastSd; 98 | 99 | jam = ((sd[0]-'0')*1000)+((sd[1]-'0')*100)+((sd[2]-'0')*10)+(sd[3]-'0'); 100 | menit = ((sd[5]-'0')*10)+(sd[6]-'0'); 101 | detik = ((sd[8]-'0')*10)+(sd[9]-'0'); 102 | 103 | if (sd != lastSd){ 104 | RtcDateTime now = Rtc.GetDateTime(); 105 | uint8_t hour = now.Hour(); 106 | uint8_t minute = now.Minute(); 107 | Rtc.SetDateTime(RtcDateTime(jam, menit, detik, hour, minute, 0)); 108 | lastSd=sd; 109 | } 110 | 111 | server.send ( 404 ,"text", message ); 112 | 113 | } 114 | 115 | // Kalau ada perubahaan jam 116 | if (server.hasArg("time")) { 117 | 118 | String st=server.arg("time"); 119 | String lastSt; 120 | uint8_t jam = ((st[0]-'0')*10)+(st[1]-'0'); 121 | uint8_t menit = ((st[3]-'0')*10)+(st[4]-'0'); 122 | 123 | if (st != lastSt){ 124 | RtcDateTime now = Rtc.GetDateTime(); 125 | uint16_t year = now.Year(); 126 | uint8_t month = now.Month(); 127 | uint8_t day = now.Day(); 128 | Rtc.SetDateTime(RtcDateTime(year, month, day, jam, menit, 0)); 129 | lastSt=st;} 130 | server.send ( 404 ,"text", message ); 131 | 132 | } 133 | }); 134 | 135 | 136 | server.on ( "/xml", handleXML) ; // http://192.168.4.1/xml 137 | 138 | server.begin(); 139 | Serial.println("HTTP server started"); 140 | 141 | //DMD 142 | Disp.start(); 143 | 144 | Disp.setBrightness(20); 145 | 146 | 147 | } 148 | 149 | 150 | 151 | 152 | //---------------------------------------------------------------------- 153 | // LOOP 154 | 155 | void loop() { 156 | 157 | server.handleClient(); 158 | 159 | switch(tmputama) { 160 | 161 | case 0 : 162 | tampiljws(); 163 | break; 164 | 165 | case 1 : 166 | iqomah(); 167 | break; 168 | 169 | } 170 | 171 | Disp.loop(); 172 | UpdateWaktu(); 173 | 174 | } 175 | 176 | 177 | 178 | void tampiljws() { 179 | 180 | switch(tmpjws) { 181 | 182 | case 0 : 183 | animLogoX(); 184 | break; 185 | 186 | case 1 : 187 | JamBesar(1); 188 | tampilinfo(); 189 | break; 190 | 191 | case 2 : 192 | TeksBerjalanKananKiri(); 193 | break; 194 | 195 | } 196 | 197 | } 198 | 199 | 200 | 201 | void tampilinfo() { 202 | 203 | switch(tmpinfo) { 204 | 205 | case 0 : 206 | TampilTanggal(); 207 | break; 208 | 209 | case 1 : 210 | TampilSuhu(); 211 | break; 212 | 213 | case 2 : 214 | TampilJadwalSholat(); 215 | break; 216 | 217 | } 218 | 219 | } 220 | 221 | 222 | 223 | void BunyiBeep() { 224 | 225 | static uint32_t pMBuz; 226 | uint32_t cM = millis(); 227 | static boolean beep; 228 | 229 | if (cM - pMBuz >= 200) { 230 | 231 | pMBuz = cM; 232 | 233 | beep = !beep; 234 | 235 | } 236 | 237 | if (beep) { 238 | 239 | digitalWrite(buzzer, HIGH); 240 | 241 | } else { 242 | 243 | digitalWrite(buzzer, LOW); 244 | 245 | } 246 | 247 | } 248 | --------------------------------------------------------------------------------