ES-19O‘rtaPremium
Automatic Lighting with the ESP32 PIR Motion Sensor
In this project an HC-SR501 PIR motion sensor detects someone entering the room and turns on an LED automatically. millis() tracks how long the LED stays on: each HIGH reading refreshes the last-motion time, and the LED turns off at least 10 seconds after the last HIGH. The code also waits 50 ms with delay(50) in every loop, so the loop is not fully non-blocking. Great for stairs, hallways, bathrooms or closet lighting.
4.4(24)
38 bajarildi
No more fumbling for the light switch in a dark hallway: the light comes on by itself as soon as someone walks in. The motion sensor notices body heat, the ESP32 turns on the LED and switches it off 10 seconds after the last movement, and if anyone moves in the meantime the countdown starts over. It is the first step towards smart lighting for stairs, cupboards or the bathroom.
Manba kodi
Bu loyihaning blokli ko‘rinishi ham bor. Bloklar ham kod kabi Premium bilan ochiladi. Blokli dasturlash nima?
Premium kontent
Bu loyihaning manba kodi, blokli ko‘rinishi va ko‘p so‘raladigan savollari Premium a’zolar uchun ochiq.
- Barcha loyiha kodlari
- Blokli ko‘rinish
- Ko‘p so‘raladigan savollar
