Advertisement
mr_arte

weichenmanager.lua

May 12th, 2022
662
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("bottom")
  2.  
  3. while true do
  4.     id, message = rednet.receive()
  5.     print("ID: ", id)
  6.     print("Nachricht", message)
  7.  
  8.     if message == "1" then
  9.         redstone.setOutput("right", true)
  10.         redstone.setOutput("left", false)
  11.     elseif message == "2" then    
  12.         redstone.setOutput("right", true)
  13.         redstone.setOutput("left", true)
  14.     elseif message == "3" then
  15.         redstone.setOutput("right", false)
  16.     end
  17.  
  18.     sleep(0.1)
  19. end
Advertisement
RAW Paste Data Copied
Advertisement