Posted 03 October 2012 - 05:06 AM
This 2-part program adds a key card type lock for doors and a rednet logging feature.
The two parts should be run on separate computers as each has a GUI of its own.
Image - Setup: To the right the computer running the lock, and to the left the one running the logger. Redpower buffer gate cancels flunctuations in redstone lock from reboots in the system.
The lock waits for either a card or the correct override password. In case of a card it sends the name of the User, location and time when the card was used. You can still run the lock even with no logger on with no side effects.
Image - Lock
The logger has several options that can be used for managing it, and can data from several locks. It also ignores broadcast messages!
Image - Logger
Key Card should have a file named "password" and contain
ATENTION!
For this lock to work the door must be place so that it closes with a redstone signal, otherwise it wont work! To achieve this simply place the door facing the block you will be placing it on from the side (diagonals also work provided you are closer to the wall)
Download Code:
Lock - http://pastebin.com/EcGGWXq8
Logger - http://pastebin.com/dVBV6eJN
This is my first code so feedback is appreciated.
The two parts should be run on separate computers as each has a GUI of its own.
Image - Setup: To the right the computer running the lock, and to the left the one running the logger. Redpower buffer gate cancels flunctuations in redstone lock from reboots in the system.
The lock waits for either a card or the correct override password. In case of a card it sends the name of the User, location and time when the card was used. You can still run the lock even with no logger on with no side effects.
Image - Lock
The logger has several options that can be used for managing it, and can data from several locks. It also ignores broadcast messages!
Image - Logger
Key Card should have a file named "password" and contain
banana -- change this to your password
Liude -- change this to the owner of the card
ATENTION!
For this lock to work the door must be place so that it closes with a redstone signal, otherwise it wont work! To achieve this simply place the door facing the block you will be placing it on from the side (diagonals also work provided you are closer to the wall)
Download Code:
Lock - http://pastebin.com/EcGGWXq8
Logger - http://pastebin.com/dVBV6eJN
This is my first code so feedback is appreciated.