Hello Pro´s,
can i send and receive redstone.setOutputs or .getInputs from another computer ?
the computer who gets the Input and sets Output is computer_4.
the computer that working with the programm that calls computer_4 to set a Output is computer_5.
they are connected on cable.
i only need a example for .setOutput and .getInput
thanks for help
computer set IO to computer
Started by darcline, May 22 2015 08:02 PM
3 replies to this topic
#1
Posted 22 May 2015 - 08:02 PM
#2
Posted 22 May 2015 - 10:10 PM
You don't know till you try.
If you mean to send redstone signals down modem cables, you will need to "wrap" them in the networking API (rednet API)
If you have the two computers next to each other (with dust between) then is should work.
If you have the two computers in contact with each other then I have no idea, try it and tell me.
For reference, the redstone API.
If you mean to send redstone signals down modem cables, you will need to "wrap" them in the networking API (rednet API)
If you have the two computers next to each other (with dust between) then is should work.
If you have the two computers in contact with each other then I have no idea, try it and tell me.
For reference, the redstone API.
Edited by Lupus590, 22 May 2015 - 10:11 PM.
#3
Posted 23 May 2015 - 11:02 AM
sorry i think i mean this
sorry my english is not so good to say what i mean and what not
Quote
If you mean to send redstone signals down modem cables, you will need to "wrap" them in the networking API (rednet API)
sorry my english is not so good to say what i mean and what not
#4
Posted 23 May 2015 - 01:25 PM
From what I understand, you want your system to transmit a redstone state from one computer to another where it recreates it.
The input computer (the one reading the redstone and sending the network message) will need something like this:
The receiving computer (the one listening for modem messages and emitting redstone) will need something like this:
you may need to read these tutorials and wiki pages
http://www.computerc...w-is-it-useful/
http://computercraft...ki/Os.pullEvent
http://computercraft...stone_%28API%29
http://computercraft...ednet_%28API%29
http://computercraft...Rednet_Tutorial
The input computer (the one reading the redstone and sending the network message) will need something like this:
--#this is not true lua, this is psudo code --#you will need to edit it to make it work in computercraft while true do event = os.pullEvent() if event == redstone then redstoneValue = rs.getValue() modem.send(redstoneValue) end end
The receiving computer (the one listening for modem messages and emitting redstone) will need something like this:
--#once again psudo-code while true do event = os.pullEvent() if event = modem_message then redstoneValue = modem.pullMessage() rs.set(redstoneValue) end end
you may need to read these tutorials and wiki pages
http://www.computerc...w-is-it-useful/
http://computercraft...ki/Os.pullEvent
http://computercraft...stone_%28API%29
http://computercraft...ednet_%28API%29
http://computercraft...Rednet_Tutorial
Edited by Lupus590, 23 May 2015 - 01:27 PM.
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











