Log 16 Posted February 23 Share Posted February 23 A simple and compact code lock with a password that can contain digits from 1 to 9. 0 is used as the "enter" button. The length of the password can range from 1 to 255. Steps to use: 1. Arrange the modules in a comfortable configuration (lock the sides if necessary) 2. Set the constants 3. Upload the program to the execution module 4. Set the password Right-click to open the ROM interface In cell 0 set the password length Sequentially set each digit of the password Install the ROM into a casing block 5. To activate redstone, type the correct password and press "0" to confirm. Constants: DELAY - redstone activation time Sides: RED - redstone module ROM - ROM module KEY - keypad [KEY] [ROM][EXE][RED] ----- PAGE 1 ----- #DEFINE DELAY 20 #DEFINE RED RIGHT #DEFINE ROM LEFT #DEFINE KEY UP START: MOV NIL ACC SAV LOOP: MOV KEY ACC JEZ CHECK SWP ADD 1 MOV ACC ROM SWP SUB ROM JNZ START JMP LOOP #BWTM ----- PAGE 2 ----- CHECK: SWP MOV NIL ROM SUB ROM JNZ START MOV 15 RED MOV DELAY ACC SLEEP: SUB 1 JGZ SLEEP MOV NIL RED Quote Link to post Share on other sites