os.loadAPI("ahb")
interupteur=ahb.addPeripheral("hb_interupteur_0")
reacteur=ahb.addPeripheral("top")
interupteur.pp.set(0)
while true do
	if not(reacteur.pp.getInjectionRate()==4) then
		reacteur.pp.setInjectionRate(4)
	end
	if reacteur.pp.getPlasmaHeat()==0 then
		interupteur.pp.set(15)
		os.sleep(1)
		interupteur.pp.set(0)
	end
	
	
	os.sleep(60)
end
