One of us is not correct here and i think it is you, as for starters the switch is connected to INPUT PIN4 and the 311 is connected to INPUT PIN3 not as you have listed above.
Are you sure like 100% sure the 311 output is LOW with no flame, and HIGH after 12 seconds with a flame present, as i had thought it was the other way around.
I dont know if your thermister is a NTC or a PTC thermister so i am unable to work it out from the circuit.
Then this................
If the output of the 08m is LOW then the motor will be OFF, it needs a high on the output to turn the fet on which will turn the motor on.
From what you have told me for the operation and with correcting the input pins for the right function then this code should be correct.
I have also changed the code to make it written for the picaxe 08m2 chip.
Pete.
Code:
'THIS VERSION 0006 BY SABORN
#picaxe 08m2
symbol switch_1 = pinC.4
symbol C_311 = pinC.3
symbol motor = C.2
symbol Y = b1
main:
if C_311 = 0 AND switch_1 = 1 then Delay
if C_311 = 1 OR switch_1 = 0 then
low motor ; gas OR switch OFF, Motor OFF - if the flame is on in the middle
endif
goto main
Delay:
for Y = 0 to 11
wait 1
if C_311 = 0 AND switch_1 = 1 then
next Y
endif
if C_311 = 0 AND switch_1 = 1 then
gosub Gas_on
endif
goto main
Gas_on:
high motor ;gas and switch ON, wait 12s and Motor ON
return