Project Overview
Our group was responsible for designing and building the secure safe for the Bank Heist project. Using four interconnected micro:bits, we created a functional locking system that integrates multiple interactive components. The safe includes LED indicator lights that react to the other puzzles being solved, a potentiometer that acts like a rotating code lock, a servo that controls the vault door, and an interactive button that must be pressed to end the game.
The Lights
NeoPixel Lights CodeThe lights act as the security system to our vault. LED lights connected to the micro:bits provide feedback, signaling whether or not the other puzzles are completed.
We used the neo pixels light for this. It starts off as red, but when button A is clicked, it turns green.
The Lock
Servo Code Rotary Encoder CodeThe lock is the core security feature of our safe, ensuring that only the correct code or sequence can grant access. Using a micro:bit, we made it so on rotating the potentiometer, it would play ticking noises, and the closer you were to the correct number, the ticking noise would be a higher pitch. When the three codes are selected, the lock disengages, allowing the safe to open - which is controlled by a servo.
Using the rotary encoder, we made it so we can always reset the code. At the start, the pass_Code is set to 150. If the input on pin P0 is close to 150: It shows the number 1, plays a sound, then sets pass_Code to 750 for the next step. If the input is now close to 750, show the number 2, play a sound, set pass_Code to 300 for the next step. If the input is now close to 300, show the number 3, play a sound. Then show a heart icon to signal success. Then set Complete to true.
After this process, it sends a signal to the servo at the door, and unlocks it. I made it a simple push door, and if the lock gets the signal, it moves out of the way and you can push the door open.