Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO and ESP8266 WiFi-Enabled Smart Islamic Reminder Display

View and Edit Project In Cirkit DesignerImage of Arduino UNO and ESP8266 WiFi-Enabled Smart Islamic Reminder Display

Circuit Documentation

Summary

The circuit in question is designed to integrate an Arduino UNO with a PIR sensor, a Piezo Speaker, an I2C LCD 16x2 Screen, and an ESP8266 ESP-12E WiFi Module. The Arduino UNO serves as the central microcontroller, interfacing with the PIR sensor to detect motion, outputting sound through the Piezo Speaker, displaying information on the LCD screen, and potentially communicating over WiFi using the ESP8266 module.

Component List

Arduino UNO

PIR Sensor

Piezo Speaker

I2C LCD 16x2 Screen

ESP8266 ESP-12E WiFi Module

Wiring Details

Arduino UNO

PIR Sensor

Piezo Speaker

I2C LCD 16x2 Screen

ESP8266 ESP-12E WiFi Module

Documented Code

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <ESP8266WiFi.h>

LiquidCrystal_I2C lcd(0x27, 16, 2); // I2C address for the LCD
const int pirPin = D1; // Pin for the PIR sensor
const int speakerPin = D2; // Pin for the piezo speaker (use pin D2)

// List of Islamic information
const char* infoList[] = {
    "Sunnah: Shalat Dhuha",
    "Adab: Berdoa sebelum makan",
    "Jadwal Shalat: 05:00 Fajr",
    "Pengingat: Baca Al-Qur'an",
    "Amalan Harian: Sedekah",
    "Amalan Pekanan: Shalat Jumat",
    "Amalan Mingguan: Zikir",
    "Amalan Bulanan: Puasa Sunnah",
    "Amalan Tahunan: Haji"
};

int currentInfoIndex = 0; // Current index of the information

void setup() {
    Serial.begin(115200);
    lcd.begin();
    pinMode(pirPin, INPUT);
    pinMode(speakerPin, OUTPUT);
    lcd.print("Layar Pintar");
}

void loop() {
    int motionDetected = digitalRead(pirPin);
    if (motionDetected == HIGH) {
        lcd.clear();
        lcd.print(infoList[currentInfoIndex]); // Display current information
        tone(speakerPin, 1000, 500); // Notification sound
        delay(2000); // Display for 2 seconds

        // Move to the next piece of information
        currentInfoIndex++;
        if (currentInfoIndex >= sizeof(infoList) / sizeof(infoList[0])) {
            currentInfoIndex = 0; // Reset to the beginning if it reaches the end
        }
    }
}

The code is designed to display a list of Islamic information on the LCD screen when motion is detected by the PIR sensor. It also emits a notification sound through the Piezo Speaker. The information is cycled through each time motion is detected.