This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Zequan's profile picture

Remote computer controlled door lock

Started by Zequan, 27 May 2014 - 01:14 PM
Zequan #1
Posted 27 May 2014 - 03:14 PM
Ok guys so I've come up with a brilliant idea and looking for help to write the code. Now we have all see those password door locks. But I was thinking about creating a program where I have the door locked with a password outside my base with a computer using something like this http://www.computercraft.info/wiki/index.php?title=Making_a_Password_Protected_Door Also having another computer above with a wireless modem attacted to use this chat program for people to request access to my base http://www.computercraft.info/forums2/index.php?/topic/14305-talk-an-uber-simple-chat-program/ Now I want to be able to issue a command on a computer inside my base that will open the door to the entrance of my base. If this is possible and someone is willing to help with the code, that would be great.

Thanks

Zequan
CometWolf #2
Posted 27 May 2014 - 04:24 PM
This has already been done more times than i can count, and using Talk as the input would probably be a bad idea. Seeing as it's a chat client, which means there wouldn't be any encryption and it would also show a log of all password attempts at all times lol.
BlockSmith #3
Posted 27 May 2014 - 11:44 PM
One thing I've noticed about this forum is that most responses are blunt. Zequan it's a good idea and doing a project others have done isn't a bad thing. Every time a program is done over it could be done differently, sometimes better. Sometimes while working on that program you come up with another idea to work on. Keep a pen and pad by you and write down your ideas for programs then try them. It's the only way to get better at programming. Think, plan, and do.

Look into the OS API for os.pullEvent() or os.pullEventRaw() for ways to keep people from terminating the program

http://computercraft.info/wiki/OS_(API)

Look into the redstone API for messing with redstone power outputs

http://computercraft.info/wiki/Redstone_(API)

Look into the rednet API for sending and receiving wireless messages across computers. I suggest sticking with mostly rednet.send() as opposed to rednet.broadcast()

http://computercraft.info/wiki/Rednet_(API)

And just because I like to make neat outputs Is suggest looking into the terminal API for ways to format the screen

http://computercraft.info/wiki/Term_(API)

When you get some of your own code started I'd be happy to take a look at your issues and try to help solve them.
Edited on 27 May 2014 - 09:47 PM