Let's Make Robots!

1 sensor line tracking picaxe 08m

Line tracking

only one sensor line tracking, created and programed with picaxe 08m

circuit, very simple:

sensor, lth:

robot:

program:

main:
readadc 2,b0
if b0 < 50 then blanco
if b0 > 50 then negro
low 1
low 4
pause 100
goto main

blanco:
low 1
high 4
goto main

negro:
high 1
low 4
goto main

circuit, simple:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

 

I am not fluent in PICAXE, but I am intrigued in the simplicity and the one sensor. How do you know whether to adjust left or right when you go off line?

 maybe the line is half black and half white. So when it sees white, it goes left and when it sees black, it goes right.

 I have to try this!

I don't know if it matters but the normal way is to have the load (motor) on the collector side of the transistor. You should probably also have 1k resistor on the base to saturate the transistor. I would also recommend having a diode over the motor.

@arbarnhart: It seems that he is using two motors and two transistors and just running one of them to turn. (I might be wrong...) 

Trying to interpret the code, it appears it will go straight only with a sensor reading of exactly 50. Higher, it adjusts one way, lower the other. Is the line a seam between a black panel and a white panel?