Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
mr_spagetty

Code lock

Recommended Posts

I have created a relativly simple code lock with tis 3d that just requires a keypad (theoretically could use a terminal instead), execution module, timer, some form of output such as the redstone module, and optionally an audio moduleimage.png.0855a05f0790189875aed276369ba7a6.png

the code is as follows:
page 1

#DEFINE A 1
#DEFINE B 2
#DEFINE C 3
#DEFINE D 4
#DEFINE INP LEFT
#DEFINE TIME UP
#DEFINE OUT RIGHT
#DEFINE SOUND DOWN
MOV A ACC
SUB INP
JNZ B
ADD 1
SWP
B: MOV B ACC
SUB INP
JNZ C
SWP
ADD 1
SWP
C: MOV C ACC
#BWTM

page 2

SUB INP
JNZ D
SWP
ADD 1
SWP
D: MOV D ACC
SUB INP
JNZ BEEP
SWP
SUB 3
JLZ BEEP
MOV 0X0A50 SOUND
MOV 15 OUT
MOV 400 TIME
MOV TIME ACC
MOV 0 OUT
BEEP: MOV 0X0A54 SOUND


this code lock uses a 4 digit code where each digit can be configured with the A, B, C and D variables at the start of page 1, you can also customize the position of the input, timer, output, and audio with the relevant variables (INP, TIME, OUT, and SOUND) you can also disable the indication sounds by setting sound to nil

Edited by MR_Spagetty
Updated code to have sound
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.