Advertisement
pan7nikt

PowerMonitorClient

Jul 12th, 2020
1,105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.26 KB | None | 0 0
  1. term.clear()
  2. modem = peripheral.wrap("back")
  3. modem.open(7)
  4. term.setTextColor(colors.yellow)
  5. print("Sprawdzanie stanu CESU...")
  6.  
  7. while true do
  8.     local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent()
  9.     os.startTimer(5)
  10.     if event == "timer" then
  11.         term.setTextColor(colors.red)
  12.         print("CESU nie jest aktywne")
  13.     break
  14.     end
  15.     if message == "active" then
  16.     term.setTextColor(colors.green)
  17.     print("CESU jest aktywne")
  18.     break
  19.     end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement