Hi!
I am triyng to make a line follower. I am thinking about program to download to picaxe. I have a 28x2 pic.
I think it could be a good idea the use of parallel task (maybe it is the worst ). Anyway, I have a doubt about the use of input/output pins. I don't know how to write it. Because program editor says always: wrong! wrong! wrong!
I get this message:
C0 and C1 for left motor(motorIzq) and c2 and c3 for right motor (motorDer)
B0 for a button to start/stop the program. For the moment just stop it...
How do I have to write code for inputs/outputs pins? I am reading manual but I just see outpinsC.3... but it gives me error, or pinA.2... Do I need anything more?
I am triyng to make a line follower. I am thinking about program to download to picaxe. I have a 28x2 pic.
I think it could be a good idea the use of parallel task (maybe it is the worst ). Anyway, I have a doubt about the use of input/output pins. I don't know how to write it. Because program editor says always: wrong! wrong! wrong!
Code:
symbol cnyIzq = pinA.0
symbol cnyDer = pinA.1
symbol motorDer = pinC.2
symbol motorIzq = pinC.0
symbol boton = pinB.0
start0:
if cnyIzq=1 then high motorDer
if((cnyIzq=0) then low motorDer
if(boton=1) then goto final
goto start0
start1:
if(cnyDer=1) then high motorIzq
if((cnyDer=0) then low motorIzq
if(boton=1) then goto final
goto start1
final:
end
I am using A0, A1, A2 and A3 for CNY70. But in this version just A0 and A1.if cnyIzq=1 then high motorDer
^
Error: This command requires the pin number in format PORT.PIN!
C0 and C1 for left motor(motorIzq) and c2 and c3 for right motor (motorDer)
B0 for a button to start/stop the program. For the moment just stop it...
How do I have to write code for inputs/outputs pins? I am reading manual but I just see outpinsC.3... but it gives me error, or pinA.2... Do I need anything more?