LEGO Safe











Brief hardware/software overview:
This project is a safe/vault built using various LEGO parts. A LEGO RCX microcomputer is the �brains� of the safe; it executes code programmed on to it by the user and controls motors, reads sensors, and displays messages on the onboard LCD. For this project, I programmed the safe using the LEGO Java Operating System (leJOS).


How it works:

When the RUN button on the RCX is pressed and the program begins, a little welcome message displayed. Following this, the RCX prompts the user for the two-part code, which he or she must enter by turning the combination lock. The combination lock consists of a wheel attached to a rotation sensor, and also accompanied by a touch sensor. As the user turns the wheel, the current position of the lock (an integer) is displayed on the LCD screen of the RCX. Once the user turns the lock to a certain position (corresponding with a certain integer), he or she presses the touch sensor at which point the value on the RCX returns to zero, and the user must perform the same process with the second code value. Once the user presses the touch sensor the second time, the door will open if the code is correct, or an error message will be displayed if the code is wrong. If the code is wrong, the program will loop back to the beginning and ask for the whole two-part code again. However, if the code is correct, then the door will open for the user to deposit or withdrawal items. Once he or she wants to close the door, he or she presses the touch sensor once more, the door closes, and the program loops back to the beginning and asks for the code.



More pictures

Parts List


Back to Main Page

Hosted by www.Geocities.ws

1