Andres Rodriguez
New Member
When I run debug the debug window appears and on top there is the message "WAITING" and nothing happens. I am using port 2 to drive an LED but during debug the port is connected to the programming cable (serout)The code I'm tunning is as follows:
Code:
#picaxe 08m
#com 4
setfreq m8
'Ports
Symbol Thr=input3
Symbol Adj=input1
Symbol LED=output0
Symbol Buzz=output4
Symbol Glow=output2
'Variables
Symbol Th=W1
Symbol Ad=W2
Symbol N=W3
Th=0
Ad=0
Low LED
pwmout 2 OFF
Main:
High LED
pulsin 3,1,Th
pause 10
pulsin 1,1,Ad
pause 10
'if N<>5000 then goto Calc
Pause N
N=0
Calc:
If Th=0 or Ad=0 then goto Alarm
If W2<330 then goto Jump1
W2=330
Jump1:
If Th=0 or Ad=0 then goto Alarm
If Ad=<150 then goto Jump2
Ad=Ad-150
Jump2:
debug Ad
Th=Th-Ad
debug Th
If Th<190 then goto Ignite
pwmout 2 OFF
Low LED
goto Main
....
.......................