​ ​ ​ ​ My 1st line follower
Results 1 to 4 of 4

Thread: My 1st line follower

  1. #1
    Senior Member
    Join Date
    Sep 2016
    Location
    United Kingdom
    Posts
    630

    Default My 1st line follower

    By popular demand..well erco
    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-8r...IgkaAlOa8P8HAQ
    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:
    ;6 sensor,dual continuous servo line follower
    #picaxe 20m2
    setfreq m4
    symbol lservo=b.6
    symbol rservo=b.7
    symbol reflec=w0
    
    servo lservo,134 ;default speed
    servo rservo,166
    main:
    reflec=pinsb
    ;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
    
    
    if reflec=3 or reflec=1 or reflec=2 then servopos lservo,100:servopos rservo,154:goto main:endif ;left fastest,right slowest
    
    if reflec=6 or reflec=4 then servopos lservo,120:servopos rservo,158:goto main:endif ;left faster,right slower
    
    if reflec=4 then servopos lservo,132:servopos rservo,168:goto main:endif
    if reflec=12 then servopos lservo,134:servopos rservo,166:goto main:endif ;same           
    if reflec=8 then servopos lservo,136:servopos rservo,164:goto main:endif                  
    
    if reflec=24 or reflec=16 then servopos lservo,142:servopos rservo,180:goto main:endif ;right faster,left lower   
    
    if reflec=48 or reflec=32 or reflec=16 then servopos lservo,146:servopos rservo,200:goto main:endif ;right fastest,left slowest
    goto main
    ;servopos lservo,134:servopos rservo,166:goto main ; no pins lit

  2. #2
    Senior Member
    Join Date
    Sep 2016
    Location
    United Kingdom
    Posts
    630

    Default

    The usual photos,heath rob,tyres swapped. The sensor is fussy about height. The track was paint not uniform tape so calibrating was silly. Still..SAM_1400.JPGSAM_1401.JPG

  3. #3
    Senior Member
    Join Date
    Jul 2011
    Location
    Los Angeles, CA
    Posts
    1,792

    Default

    Just beautiful, stan74! Thanks for posting more info here. Plywood is a great chassis material. Cheap, strong, stiff, commonly available, and easy to cut.

    Chassis geometry is a huge factor. Your sensors are very close to your wheel axis. If you move your sensor forward (or wheels back) you would sense and maneuver very differently. Might be better, might not, depending on the course. Only experimenting will tell.

    Definitely your first line follower, but not your last!

  4. #4
    Senior Member
    Join Date
    Sep 2016
    Location
    United Kingdom
    Posts
    630

    Default

    To me it's fun..I do have other leejure activities but this is cheap in the winter. brrrr. Get a working chassis and your off. The same as turning leds on and off but with more imagination. Picaxe is suited for robot stuff. Top!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •