Combination Lock – Xiaoyu

Goal of project/interaction

Utilize 4 small buttons to create a combination locker
Use 1 big button to submit & reset
Green and red led to show whether the passcode is right or not
Yellow led to show each correct press

The lock passcode: 4213

Core components

4 * small buttons
1 * big button
3 * LED (red, yellow, green)
5 * 10k ohms resistors
3 * 220 ohms resistors
Wires & jumpwires
Arduino board

How it works

Press the button sequentially once a time with no repeat
If it is in right sequence, yellow led will blink
Press the yellow big button to submit (and it will reset at the same time)
Green led means unlocked (right), red led means locked (wrong)

Problems/bugs

If you don’t start with 4, and then you pressed 4, then press the buttons in a right sequence, the locker can still be unlocked.

 

 

Code

https://drive.google.com/file/d/1dMNzO5L76kNQxGnp5vSFpdWs0Kjg4Gy6/view?usp=sharing

 

Leave a Reply

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