Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Lego Robot Fun

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
352 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 18, 2010

I'm reviewing some ideas for a series of 8 one hour sessions in Robot C for NXT at a high school computer programming camp. My 9 year old wanted in on the fun and this video is the result. :)

The line following algorithm is based on the excellent discussion here:
http://www.inpharmix.com/jps/PID_Controller_For_Lego_Mindstorms_Robots.html

The maze solution is an evolutionary step in the motion planning lessons I am planning. First is timed motions, then motor coordinated motions, measured motions (loop until destination reached), simple overshoot correction, and finally using PID encoder targets.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (emajekral)

  • How do you get the robot to go so smoothly on the line. the one i programmed went back and forth scanning while going on the line.

    .?

  • @godsrunner1 Hi! There's a link in the video description. The secret is to use some extra programming to create a PID controller. The basic idea is to control how much you turn based on how bright the light the sensor sees is.

    Most basic line follower programs turn one way on "dark" and the other on "light". A PID controller knows "dark" and "light", and calculates different turn strengths for the shades of gray in between. That's the "P" part. The "I" and "D" parts help fine tune the result.

  • @emajekral

    I used RobotC to write the program. I know C pretty well so it didn't take long. The hard part for me was getting the right values for the "P", "I", and "D" controls in the program. This is called "tuning". There are some tuning suggestions in the link in the video description.

    Good luck!

see all

All Comments (4)

Sign In or Sign Up now to post a comment!
  • Ok, thanks dude. I used mindstorms program.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more