Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("front")
- lightOn = false
- while true do
- wiresOn = colors.green
- sender, message, distance = rednet.receive(1)
- if message == "lightOn" then
- print('Day begins')
- lightOn = true
- elseif message == "lightOff" then
- print('Night comes')
- lightOn = false
- end
- if lightOn then
- wiresOn = wiresOn + colors.white
- end
- rs.setBundledOutput("top", wiresOn)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement