Clem105

Computer day

Oct 5th, 2013
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.27 KB | None | 0 0
  1. local modem = peripheral.wrap("top")
  2. local Chanel = 1505
  3. modem.open(Chanel)
  4. local Etat = "Set"
  5.  
  6. while true do
  7.     local day = rs.getAnalogInput("left")
  8.     if day < 5 then
  9.         Etat = "On"
  10.     elseif day > 7 then
  11.         Etat = "Off"
  12.     end
  13.     modem.transmit(Chanel,Chanel,Etat)
  14. end
Advertisement
Add Comment
Please, Sign In to add comment