My team has gotten a 5 line tracker code. Which works really good.
Could anyone post there line tracking code? Besides this we are wondering about line tracking and stage lighting, etc. How do teams adapt there robot to different lighting conditions? We have heard of grayscale, but don’t know how to set up our line trackers, and code.
Example code which deals with different lighting conditions would be great.
Hi,
I personally don’t have any experience with line following, but one of our old team mates, Michael, did make a guide for Line following with RobotC, if it is of any use. A link is here
As for detecting different lighting conditions, whenever our team used line following, we had an extra sensor that just sat where it would normally be over the mat, and then we just compared the value from that with the values from the sensors over the line.
I hope this is useful info!
Check out this link to learn more about line following: PID Controller For Lego Mindstorms Robots
It’s demonstrated with an NTX, but it’s a great resource for all line following. As for adjusting to different light levels, we place an extra sensor right next to the sensors which will actually be doing the line following. Then we place a piece of white electrical tape under it as close to the mat as possible (the tape is placed on a bent piece of metal or plastic). Then the other sensors are calibrated using this as a white balance.
I know how to do it with Mindstorms, that is easy. It is the ROBOTC that I have a hard time with.
Once you understand the logic perfectly, then it just becomes a problem of putting it into code. In my opinion, that’s the relatively easy part. Is there a specific problem that you’re having with ROBOTC?
I am not the actual programmer for our team. I just like to see what happens. I don’t know a TON of ROBOTC. I think I might take a class soon.