By popular demand..well erco ![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
I think it's been done before. A simple line follower...well there's different ways and I tried a 6 sensor array and it's pee poor but almost funny to watch.
OK the array http://www.hobbytronics.co.uk/qtr-8rc-sensor?utm_source=google&utm_medium=googleshopping&utm_campaign=googlebase&gclid=Cj0KEQiAtK3DBRCBxt-Yxduq5p4BEiQAbFiaPbzGVBIJ41UlQmfQ_4Xn3MdTIs0JcM7PvXaEZ9mgIgkaAlOa8P8HAQ
Well I tried the "time capacitor discharge" method but used erco's "quick and dirty method"
The continuous servos don't really work slow,that's my excuse.
https://youtu.be/txIOZrravKg https://www.youtube.com/watch?v=3E7wK7x8IBc
Oh,the code I'm playing with
I think it's been done before. A simple line follower...well there's different ways and I tried a 6 sensor array and it's pee poor but almost funny to watch.
OK the array http://www.hobbytronics.co.uk/qtr-8rc-sensor?utm_source=google&utm_medium=googleshopping&utm_campaign=googlebase&gclid=Cj0KEQiAtK3DBRCBxt-Yxduq5p4BEiQAbFiaPbzGVBIJ41UlQmfQ_4Xn3MdTIs0JcM7PvXaEZ9mgIgkaAlOa8P8HAQ
Well I tried the "time capacitor discharge" method but used erco's "quick and dirty method"
The continuous servos don't really work slow,that's my excuse.
https://youtu.be/txIOZrravKg https://www.youtube.com/watch?v=3E7wK7x8IBc
Oh,the code I'm playing with
Code:
[color=Green];6 sensor,dual continuous servo line follower[/color]
[color=Navy]#picaxe [/color][color=Black]20m2[/color]
[color=Blue]setfreq m4
symbol lservo[/color][color=DarkCyan]=[/color][color=Blue]b.6
symbol rservo[/color][color=DarkCyan]=[/color][color=Blue]b.7
symbol [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Purple]w0[/color]
[color=Blue]servo lservo[/color][color=Black],[/color][color=Navy]134 [/color][color=Green];default speed[/color]
[color=Blue]servo rservo[/color][color=Black],[/color][color=Navy]166[/color]
[color=Black]main:[/color]
[color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Purple]pinsb[/color]
[color=Green];if reflec=33 then servopos lservo,134:servopos rservo,166:pause 200:endif:goto main ;sensor 2 and 5-must be junction-keep going forward straight[/color]
[color=Blue]if [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]3 [/color][color=DarkCyan]or [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]1 [/color][color=DarkCyan]or [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]2 [/color][color=Blue]then servopos lservo[/color][color=Black],[/color][color=Navy]100[/color][color=Black]:[/color][color=Blue]servopos rservo[/color][color=Black],[/color][color=Navy]154[/color][color=Black]:[/color][color=Blue]goto [/color][color=Black]main:[/color][color=Blue]endif [/color][color=Green];left fastest,right slowest[/color]
[color=Blue]if [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]6 [/color][color=DarkCyan]or [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]4 [/color][color=Blue]then servopos lservo[/color][color=Black],[/color][color=Navy]120[/color][color=Black]:[/color][color=Blue]servopos rservo[/color][color=Black],[/color][color=Navy]158[/color][color=Black]:[/color][color=Blue]goto [/color][color=Black]main:[/color][color=Blue]endif [/color][color=Green];left faster,right slower[/color]
[color=Blue]if [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]4 [/color][color=Blue]then servopos lservo[/color][color=Black],[/color][color=Navy]132[/color][color=Black]:[/color][color=Blue]servopos rservo[/color][color=Black],[/color][color=Navy]168[/color][color=Black]:[/color][color=Blue]goto [/color][color=Black]main:[/color][color=Blue]endif
if [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]12 [/color][color=Blue]then servopos lservo[/color][color=Black],[/color][color=Navy]134[/color][color=Black]:[/color][color=Blue]servopos rservo[/color][color=Black],[/color][color=Navy]166[/color][color=Black]:[/color][color=Blue]goto [/color][color=Black]main:[/color][color=Blue]endif [/color][color=Green];same [/color]
[color=Blue]if [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]8 [/color][color=Blue]then servopos lservo[/color][color=Black],[/color][color=Navy]136[/color][color=Black]:[/color][color=Blue]servopos rservo[/color][color=Black],[/color][color=Navy]164[/color][color=Black]:[/color][color=Blue]goto [/color][color=Black]main:[/color][color=Blue]endif
if [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]24 [/color][color=DarkCyan]or [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]16 [/color][color=Blue]then servopos lservo[/color][color=Black],[/color][color=Navy]142[/color][color=Black]:[/color][color=Blue]servopos rservo[/color][color=Black],[/color][color=Navy]180[/color][color=Black]:[/color][color=Blue]goto [/color][color=Black]main:[/color][color=Blue]endif [/color][color=Green];right faster,left lower [/color]
[color=Blue]if [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]48 [/color][color=DarkCyan]or [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]32 [/color][color=DarkCyan]or [/color][color=Purple]reflec[/color][color=DarkCyan]=[/color][color=Navy]16 [/color][color=Blue]then servopos lservo[/color][color=Black],[/color][color=Navy]146[/color][color=Black]:[/color][color=Blue]servopos rservo[/color][color=Black],[/color][color=Navy]200[/color][color=Black]:[/color][color=Blue]goto [/color][color=Black]main:[/color][color=Blue]endif [/color][color=Green];right fastest,left slowest[/color]
[color=Blue]goto [/color][color=Black]main[/color]
[color=Green];servopos lservo,134:servopos rservo,166:goto main ; no pins lit[/color]