Hello to the Team,
I'm confused... !
After a period of programming hiatus, I'm back at it.
I don't understand the error in my simple IF command!??
Thanks
I'm confused... !
After a period of programming hiatus, I'm back at it.
I don't understand the error in my simple IF command!??
Thanks
Code:
#Picaxe 08M2
; __ __
; Vcc o| U |o Gnd
; C.5 x|Rx Tx|x C.0
; _Set C.4 >| |> C.1
; _Pulse C.3 >| |> C.2 _OUT
; -----
;*** Pins I/O ***********************
Symbol _SET = C.4 : Input _SET
Symbol _PULSE = C.3 : Input _PULSE
Symbol _OUT = C.2 : Output _OUT
;*** Variables **********************
Symbol Measure = W1 ; Successive measurements
;-------------------------------------------------------------
DO
If _SET = 0 Then
Gosub Normal ; C.4 = LOW = 0
Else ; C.4 = High = 1
Gosub Inverse
End if
LOOP
;====================================
; SUB-ROUTINES
;====================================
NORMAL: ; ...
…
…
return
;---------------------------------------------------------
INVERSE: ; ; ...
…
…
return
; ================================