Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Lighting Node (1)
- rednet.open("right")
- args = {...}
- command = args[1]
- if command == 'on' do
- rednet.broadcast("light_on")
- message = rednet.receive()
- if message == "on true" do
- print("Lights Turned On")
- else
- print("Error")
- end
- end
- if command == 'off' do
- rednet.broadcast("light_off")
- message = rednet.receive()
- if message == "off true" do
- print("Lights Turned Off")
- else
- print("Error")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement