thomasfn

Untitled

Aug 22nd, 2012
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. print("-- REACTOR SCREEN --")
  2. print("Computer ID: " .. os.computerID())
  3.  
  4. os.unloadAPI("sensors")
  5. os.loadAPI("/rom/apis/sensors")
  6. os.unloadAPI("sensorsData")
  7. os.loadAPI("/rom/apis/sensorsData")
  8.  
  9. local side = sensors.getController()
  10. local targets = sensors.getAvailableTargetsforProbe(side, "Sensor", "Reactor")
  11. local target = targets[1]
  12.  
  13. local e = sensorsData.getProbe("ic2", "reactor")
  14. local reactor = sensors.getSensorReadingAsDict(side, "Sensor", target, "Reactor")
  15. local content = sensors.getSensorReadingAsDict(side, "Sensor", target, "Reactor")
  16.  
  17. local w = peripheral.wrap("back")
  18.  
  19. while true do
  20.  
  21. w.clear()
  22.  
  23. w.setCursorPos(1,1)
  24. w.write("Heat")
  25. w.setCursorPos(1,2)
  26. w.write(reactor[e.heat.val])
  27.  
  28. sleep(2)
  29. end
Advertisement
Add Comment
Please, Sign In to add comment