View Full Version : Tracking Lines In Hangin' Around
Insomniacsloth
09-10-2006, 22:09
Can I use the line sensor kit to track the white lines on a grey background that are on the floor of the Hangin' Around field. If so, how much programming is necessary?
AdamHeard
09-10-2006, 22:15
Can I use the line sensor kit to track the white lines on a grey background that are on the floor of the Hangin' Around field. If so, how much programming is necessary?
Those sensors return a value of 0-255 depending on the reflection it is getting. With those sensors one end will be full reflection (that'll be the end the white tape is near) and the other will be no reflection (the end the grey will be close to there). From these values you can tell whether the sensor is over the white part, or the grey part. I can't tell you the specific values for these, you have to plug it in and test it.
From there you tell it to drive the motors the way you want based on where you are. (I won't spoil this part for you).
If you know C, this shouldn't be difficuly in MpLab.
If you don't, It would be best to use EasyC.
christinedevrie
11-10-2006, 14:47
What is the best way to teach my students to write a line tracking program? Are there any tutorials for them to use? Thanks, Chris de Vries
Billfred
11-10-2006, 15:25
What is the best way to teach my students to write a line tracking program? Are there any tutorials for them to use? Thanks, Chris de Vries
As someone who's had a hand in programming a few line followers of the Mindstorms nature, the best advice I can offer here is to act like you're the robot. You've got three readings, one from each sensor in the line follower kit. What do you do if your left sensor is reading what is most likely a white line? (How long do you do that for?) The right sensor? What if none of the sensors are seeing the line?
Be the robot (no, not like that (http://www.chiefdelphi.com/media/photos/20492)), and it should be pretty easy to figure out.
Naturally, I'm assuming that you know how to program your robot to move autonomously at all. If not, you'll want a lesson in EasyC or MPLAB first.
ManicMechanic
12-10-2006, 15:25
There's a simple line-tracking example program in this rookie's guide:
http://www.chiefdelphi.com/media/papers/1871
It uses one sensor, which is not the most efficient means of line-tracking, but it's a way to get started.
Insomniacsloth
15-10-2006, 13:28
There's a simple line-tracking example program in this rookie's guide:
http://www.chiefdelphi.com/media/papers/1871
It uses one sensor, which is not the most efficient means of line-tracking, but it's a way to get started.
Thank you. I give to my programmers.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.