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

Trigger redstone signal on remote computer

Started by viveleroi, 19 April 2014 - 07:04 AM
viveleroi #1
Posted 19 April 2014 - 09:04 AM
I'm an absolutely beginner to lua/cc but am not finding clear information on how best I can toggle on/off a redstone signal on a remote computer. The idea i have is this:

- I'd like a computer control of a machine a few rooms away
- When I enter commands on a computer near me,
- A remote computer should activate/deactivate a redstone signal to the machine it's near

I'm sure it's very simple but I'm not sure if it should be over modems, rednet, or what the best procedure would be.

Thanks!
CometWolf #2
Posted 19 April 2014 - 03:32 PM
rednet and modem is essentially the same. Rednet is a modem API. Though in your case, since your pretty new at this, your probably better off just using rednet.
Generally what you need to do is
-open your modem with rednet.open()
-get user input with read()
-send the input with rednet.send()
-receive the input with rednet.receive()
-then control your redstone with rs.setOutput() according to whatever your inputs were.
http://computercraft...ednet_%28API%29
http://computercraft...stone_%28API%29
Edited on 19 April 2014 - 01:33 PM