How can i make my line following robot turn 180 degrees when both sensors sense
dannny
Posts: 4
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
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
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
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
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