Lego NXT Line Follower

Building a line follower with the Lego NXT kit is easy!

Fine tuning it, however, requires some skill. One of the most common algorithm is PID, or Proportional Integral Derivative.

Proportional says: Fix myself according to my present error

Integral says: Fix myself according to the sum off my past errors

Derivative says: Fix myself based on what the error is going to be.

There is a very good treatment of PID over here:

NXC source code

Advertisements

Making Paint.

Recently, I took on a project that turned out to be real fun. I attempted to recreate paint. With OpenGL handling the drawing, it was a task to find a good UI library that integrated OpenGL code. An obvious solution would be to use Win32 controls but they’re cumbersome and difficult to use. GLUI turned out to be a¬†disappointment as well, as it refused to work with Visual Studio without the dll. Finally, FLTK provided a much needed break. It’s pretty spiffy as far as GUI libraries go, is cross platform as well.

It’s also the first time I’ve split a project onto a more than 3 source files;
Screenshots:

 

Source

Release (Windows)