Advertisement
BusioMeister

TankLevelControler

Jul 31st, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. --Tank Level Controler
  2. local modem = peripheral.find("modem")
  3. local valve = peripheral.find("rcsteeltankvalvetile")
  4. rednet.open("top")
  5. while true do
  6.     local tankStats = tankInfo[1] --# store the first table returned
  7.     print tankStats.rawName --# print the raw name of the fluid in the tank
  8.     print tankStats.amount --# print the amount in the tank
  9.     print tankStats.capacity --# print the capacity of the tank
  10.     rednet.send(1,amount,"amount")
  11.     rednet.send(1,capacity,"capacity")
  12.     rednet.send(1,filled,"filled")
  13.     sleep(1)
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement