Joyce’s Lock(week 4)

Goal:

The goal of this project is to build a combination lock that uses 4 buttons and LEDs that indicates lock status.

Components:

red led x1

green led x1

blue led x1

button x4

resistor(200Ω) x4

resistor(10kΩ) x4

arduino board & breadboard

 

How it works

Users need to input a combination of 4 numbers to open the lock. The blue button is a reset light which will light up 5 seconds after the right code is input (The lock is locked again, the input is reset ) or the wrong four numbers are input (meaning please try again, the input is reset). The red light means a wrong code is pushed and the green light means the code is correct.

Code: https://github.com/joycemolly/pcomp–lock-combination/blob/master/homeworkLock.ino

Leave a Reply

Your email address will not be published. Required fields are marked *