ESP32 Starter Kit
if(yellow_key
==
0){
while(1){
DigitalTube.displayFloatNum(item);
item--;
delay(1000);
buzz_val
=
!buzz_val;
digitalWrite(buzz,buzz_val);
if(item
==
0){
digitalWrite(buzz,LOW);
break;
}
}
while(item==0){
DigitalTube.displayFloatNum(item);
printByte(weep);
int
red_key
=
if(red_key
==
break;
}
}
}
}
5. Test Result
After connecting the wiring and uploading code, press blue button to add time, green to reduce and red to reset. Press
yellow button for counting down. When it is over, the bomb explodes.
8.5.18 Project 17: Invasion Alarm
1. Description
This invasion alarm system is able to detect invaders in houses or small offices and warn the host to take measures in
time.
In this project, the sensor monitors a certain area. Some device on Arduino board will trigger LED to light up and
buzzer to beep for caution if a movement is detected in that zone.
Virtually, this module features practicability, easy installation and low costs. With the exception of home and office, it
also applies to factories, warehouses and markets, which, to a large extent, protects property security.
104
digitalRead(reset);
0){
//whlie()loop
//Digital tube displays the item value
//item--equals to item = item - 1
//""takes the inverse runner. invert buzz_val
//break to exit the loop
//when itme=0, enter loop
//Digital tube displays the item value
(continued from previous page)
//Display a crying face
Chapter 8. Arduino Tutorial
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?
Questions and answers