Airsoft Bomb
Arduino nano project
Devices used:
i2c display 1602
TM1637 = 11, 12
keyboard 4x3 = 8, 7, 6, 5, 4, 3, 2
Buzzer = 9
red LED = A1
yellow LED = A2
green LED = A3
relay = 10
The logic of the program:
1. Initialization of all devices, timer and libraries.
2. On the display 1602 the inscription "Enter code"
3. If you press "*" and "#" before activating the timer, you will not be able to change the standard time of the timer (Max Minutes <=59 and Max Seconds <=59), but after activating the timer, you cannot change the time.
4. While entering the code, each time you press it, the yellow LED and the buzzer will turn on.
5. After entering the code "7355608" on the display 1602 "press "#" to activate", after pressing "#" on the TM1637 the timer starts for 5 minutes, and on the display 1602 the inscription "activated" and the red LED and the buzzer start blinking 1 time per second.
6. To deactivate, press "*" and on the display 1602 the inscription "enter code". The password for deactivation is "7355608", there are 3 attempts to deactivate the timer. After the 2nd incorrect entry attempt, the time on the timer is reduced by 2 times and the red LED and buzzer work 2 times per second, and after the 3rd incorrect password entry, the time ends and the red LED and buzzer are active for 10 seconds, and the relay for 5 seconds , TM1637 is cleared, and the display 1602 reads "time out" for 10 seconds, and then the whole program starts over.
7. If the correct password is entered on the TM1637, the timer stops, the green LED and the buzzer fire 3 times and the green LED remains on, and the display 1602 reads "completed" for 20 seconds, and then the whole program starts again.