term.clear() term.setCursorPos(1,1) os.loadAPI("ocs/apis/sensor") local functions = sensor.wrap("right") local mfe local total = 0 local count = 1 local mfeCount = 6 local maxStorage = 600000*mfeCount local function recharge() local goto = count while count <= 7 do turtle.down() count = count + 1 end sleep(5) end local function read() print("Scanning...") while count <= mfeCount do turtle.down() mfe = functions.getTargetDetails("0,0,1") if mfe.Stored > 600000 then total = total + 600000 else total = total + mfe.Stored end count = count + 1 end end local function print() if turtle.getFuelLevel() < 30 then recharge() end while count > 1 do turtle.up() count = count - 1 end count = 0 sleep(.5) --term.redirect(peripheral.wrap("front")) print(total) print(tostring(mfe.StoredPercentage).."%") --term.restore() total = 0 end while true do read() print() sleep(.5) end
I am using a sensor turtle with OpenCCsensors 0.1.4c. Any reason why this may be happening?
Thanks.