m = peripheral.getMethods("front")
s = peripheral.wrap("right")
local function prin(w)
 print(textutils.serialize(w))
end
--prin(m)
lastValue = 0
--prin(s.getTankInfo("front"))
while true do
now = tonumber(s.getEUStored())
loss  = now/20-lastValue/20
if now >= 39995000 then
print("mfsu is fully charged, waiting..")
sleep(0)
else
if loss >= 0 then
 print("+ "..loss.." eu/t")
elseif loss < -100 then
 print(loss.." eu/t")
 turtle.dig()
 turtle.place()
 sleep(2)

else
 print(loss.." eu/t")
end
end
lastValue = now
sleep(1)
end
