Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Config:
- channel = 2 -- Used channel 2 to 8
- --Prog:
- local modem = peripheral.wrap("right")
- modem.open(channel)
- while true do
- sleep(0)
- local event, modemSide,senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- print(message)
- if message == "yellow" then
- turtle.select(1)
- sleep(0.15)
- turtle.placeDown()
- end
- if message == "red" then
- turtle.select(2)
- sleep(0.15)
- turtle.placeDown()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment