irnotbeowulf

plantmng

May 2nd, 2016 (edited)
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.61 KB | None | 0 0
  1. pos = 0
  2. seedChecker = peripheral.wrap("agricraft_peripheral_1")
  3. rednet.open("top")
  4. rednet.broadcast("start")
  5.  
  6. function pulse(color)
  7.   rs.setBundledOutput("left",color)
  8.   sleep(.5)
  9.   rs.setBundledOutput("left",0)
  10. end
  11.  
  12. while true do
  13.   local id, msg = rednet.receive()
  14.   if msg == "activator1" then
  15.     pulse(colors.red)
  16.   elseif msg == "activator2" then
  17.     pulse(colors.green)
  18.   elseif msg == "activator3" then
  19.     pulse(colors.brown)
  20.   elseif msg == "checkSeed" then
  21.     seedChecker.analyze()
  22.     sleep(1)
  23.     growth, gain, strength = seedChecker.getSpecimenStats()
  24.     print("growth "..growth)
  25.   end
  26. end
Add Comment
Please, Sign In to add comment