GamearooCodes

Microcontroler Bios

May 1st, 2023 (edited)
936
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. local m = component.proxy(component.list("modem")()) -- get primary modem component
  2.  
  3. local rs = component.proxy(component.list("redstone")())
  4. m.setWakeMessage("on")
  5. m.open(123)
  6. -- Send some message.
  7. -- Wait for a message from another network card.
  8. while true do
  9.     local name, receiver, sender, port, distance, color, state, side, on = computer.pullSignal()
  10. if name == "modem_message" then
  11.     computer.beep(500, 1.5)
  12. if(on == "OFF") then
  13.    
  14.     computer.shutdown(false)
  15. else
  16. rs.setBundledOutput(side, {[color] = state})
  17. end
  18. end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment