Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("top")
- rednet.host("grue2", "grue_dono2")
- STATION = peripheral.wrap("right")
- CLUTCH = {peripheral.wrap("redstone_relay_9"), "right"}
- GEARSHIFT = {peripheral.wrap("redstone_relay_9"), "front"}
- GANTRY = {peripheral.wrap("redstone_relay_9"), "left"}
- while true do
- id, message, protocol = rednet.receive("grue2")
- if message == "assemble" then
- STATION.assemble()
- print("Assemble")
- end
- if message == "disassemble" then
- STATION.disassemble()
- print("Disassemble")
- end
- if message == "clutch0" then
- CLUTCH[1].setOutput(CLUTCH[2], false)
- end
- if message == "clutch1" then
- CLUTCH[1].setOutput(CLUTCH[2], true)
- end
- if message == "gearshift0" then
- GEARSHIFT[1].setOutput(GEARSHIFT[2], false)
- end
- if message == "gearshift1" then
- GEARSHIFT[1].setOutput(GEARSHIFT[2], true)
- end
- if message == "gantry0" then
- GANTRY[1].setOutput(GANTRY[2], false)
- end
- if message == "gantry1" then
- GANTRY[1].setOutput(GANTRY[2], true)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement