--Creates a line graph of power storage device @ position with monitor on left and radar sensor thing on top. Use industrialcraft2 sensor card.

os.loadAPI("ocs/apis/graph")
os.loadAPI("ocs/apis/sensor")

target = peripheral.wrap("right")
CCsensor = sensor.wrap("back")
position = "-3,0,-7"

term.clear()

function update()
	local tab = sensor.call("back", "getTargetDetails", position)
	return tab.Heat
end

newGraph = graph.new(target, update, "Nuclear Reactor HEAT:", nil, 0, CCsensor.getTargetDetails(position).MaxHeat, true)

while true do
	newGraph:draw()
	sleep(1)
end
