ESP32 Project: Smart Alarm using NTP

Purposes:

Keep the LED on when occupancy is ON and not the bed time.

Assume Go-to-Bed time is 10PM and wake up time is 6AM for weekdays and 11PM/8AM for weekends.

ESP32 Board to measure:

  • Occupancy from a PIR Sensor, if occupancy is ON (OFF), recheck every 5 minutes (1 second).  
  • Light Intensity from an LDR 
  • Light intensity using a three-colored LED.   The intensity is controlled by a volume resistor which is in series with the LDR.  The voltage read by ADC should be around 50% full scale.  If the natural light is higher than the set value turn off the LED.  
  • Notification using an active buzzer 

Noted:

  • Before turning off the light due to loss of occupancy, activate Noti A and wait for 20 seconds then activate Noti B and wait for 10 seconds.
  • If the LED is ON and it reaches bedtime, send Noti C every 10 minutes until the LED is OFF.
Project:

Tidak ada komentar:

Posting Komentar

Pages