Shop OBEX P1 Docs P2 Docs Learn Events
How can i make my line following robot turn 180 degrees when both sensors sense — Parallax Forums

How can i make my line following robot turn 180 degrees when both sensors sense

dannnydannny Posts: 4
edited 2009-01-08 17:39 in BASIC Stamp
well basically my robot follows black lines using 2 ultra violet sensors attached to it. i have everything working but when i get to the end theres a solid black strip and i want the robot to turn·180 degrees·and go through the track again

so basically when both sensors ( in14, in15) = 1 then one wheel ( 2) turns back wards and the other ( 0 ) turns forward untill robot is turned around thats what i need to input but im new to this and im not sure how

Comments

  • $WMc%$WMc% Posts: 1,884
    edited 2009-01-08 00:48
    dannny

    Are You using steppers or servos for the drive motors....Are You sure Your using "Ultra Violet" and not Infrared ?

    Post some code. This will help a lot.

    ____________________$WMc%_______________

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there·········································· E=$WMc%2
  • FranklinFranklin Posts: 4,747
    edited 2009-01-08 01:46
    Your colclusion is correct. Have you gone through the manual for the boe-bot yet? It explains most of this quite well.Show us what you have.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • dannnydannny Posts: 4
    edited 2009-01-08 17:39
    IF IN14 = 0 then High 0
    IF IN14 = 1 then High 0

    IF IN15 = 0 then High 2
    IF IN15 = 1 then High 2

    using drive motors and sorry they are infrared sensors not UV

    this code above makes the robot move when the sensors both see white, when one sensor sees black the corresponding wheel stops ( right sensor right wheel, etc) then the other wheel keeps moving until they both see white again
Sign In or Register to comment.