Pandana

GearShiftReceiver

Jan 25th, 2021 (edited)
277
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. output_side = "top"
  2. raise_output = true
  3. raise_message = "raise_lift"
  4. lower_message = "lower_lift"
  5. rednet_side = "back"
  6.  
  7. rs.setOutput(output_side, raise_output)
  8.  
  9. rednet.open(rednet_side)
  10.  
  11. while true do
  12.    
  13.     id, message = rednet.receive()
  14.    
  15.     if message == raise_message then
  16.        
  17.         rs.setOutput(output_side, raise_output)
  18.        
  19.     elseif message == lower_message then
  20.    
  21.         rs.setOutput(output_side, not raise_output)    
  22.    
  23.     end
  24.    
  25. end
RAW Paste Data