TheAppleMac
Member
Hi guys, I'm a complete newbie in the world of PICAXE.
I want to make something (haven't really decided what yet) which responds to IR.
My program:
# picaxe 08m2
irin C.3, infra
main:
irin [1000, main], C.3, b0 ;wait for new signal
if b0= 1
then swon1 ;switch on 1
if b0 = 2
then swon2 ;switch on 2
if b0 = 3
then swon3 ;switch on 3
goto main
swon1: high C.0
pause 250
low C.0
swon2: high C.1
pause 250
low C.1
swon3: high C.2
pause 250
low C.2
When I do a syntax check, it tells me that "if b0 = 1" is a syntax error.
I realise this may be a really simple answer, but this has completely stumped me!!
Thanks for your time
I want to make something (haven't really decided what yet) which responds to IR.
My program:
# picaxe 08m2
irin C.3, infra
main:
irin [1000, main], C.3, b0 ;wait for new signal
if b0= 1
then swon1 ;switch on 1
if b0 = 2
then swon2 ;switch on 2
if b0 = 3
then swon3 ;switch on 3
goto main
swon1: high C.0
pause 250
low C.0
swon2: high C.1
pause 250
low C.1
swon3: high C.2
pause 250
low C.2
When I do a syntax check, it tells me that "if b0 = 1" is a syntax error.
I realise this may be a really simple answer, but this has completely stumped me!!
Thanks for your time