Hi Steve Matson,
i had the same issue last night.
The trick is very simple !
You used:
If Pin0 = 1 AND Pin1 = 1 Then outpintwo
But you need to do:
If (Pin0 = 1) AND (Pin1 = 1) Then outpintwo
The () make all the difference
Regards
Hi Steve Matson,
i had the same issue last night.
The trick is very simple !
You used:
If Pin0 = 1 AND Pin1 = 1 Then outpintwo
But you need to do:
If (Pin0 = 1) AND (Pin1 = 1) Then outpintwo
The () make all the difference
Regards
Look hard at your logic.
IF PinZero = 0 then Out1 When this is true, you never make it to the 2nd comparison
since Out1 returns you right back to Loop.
If this evaluates as false, then the 2nd comparison will be checked, but then it will always
be false, because PinZero has to be 1 to fall-through to the next comparison.
code Example:
if (ThrottleUp=1) then
if (ThrottleDn=1) then
if (TrimOK=2) then
if (AutoRun=1) then
GoSub EnablePump 'Set required PWM/Timer2 registers
GoSub EnableGlow
PumpMath=0
RunStatus =0
Evt1 = 0
goto AutoStart
endif
endif
endif
endif
My Hobbies is PicBasic PRO
Bookmarks