|
How to Line Tracking with LEGO Mindstorms + leJOS Spoogy [1 posts] |
17 year
|
Hello,
I am trying to write an algorithm for Line Tracking. But I have no good ideas.
What do I have:
- LEGO Mindstorms
- NXT (leJOS: kind of JAVA)
- Driving Robot availible
- ColorSensor in Combination with LightSensor
or
- ColorSensor in Combination with CompassSensor
What do I want:
- Following a path
- Turn left or right on Crossroads (They are coded with colors 6cm before the crossroads appear)
My Idea:
- While (Black) driveForward
- CompassReset (to Zero)
- if (white && CompassSensor!=0) rotateTo(0°)
Anyone any good idea? Thank you very much!
Greetz Spoogy
|
|
|
Anonymous |
17 year
|
Spoogy,
This seems to be a very straightforward algorithm that has been coded many times for the Lego NXT. Perhaps you can check google to see if anyone has a script already built that can do this. Lego even comes with a line following script that you can perhaps modify.
If you're using LeJOS there must certainly be algorithms written to do such a thing. Perhaps some of the more lego centric sites like
http://thenxtstep.blogspot.com/
http://nxtasy.org/
http://www.motocube.com/
http://www.bnxt.com/
http://www.nxtclub.com/
http://legoeducation.info/nxt/
http://us.mindstorms.lego.com/nxtlog/projectinsert.aspx
might be helpful.
STeven.
|
|