Sunday, November 13, 2011

Programming Progress

I haven't posted in quite a while, and that is because there wasn't really anything to write about. I have done very little robot work in the last few months. The little I had been doing was mostly learning the programming language that I'm using (a limited subset of C++).

Over the past week I've spent a good amount of time on the Robot. I ended up making even more progress than I expected to. I wrote a library (the Arduino version of a class) to do smoothing of all the sensor readings via averaging. Doing it as a library should simplify the implementation of it for each of the sensors. Just getting that working would have made me happy since it required me learning some new formatting and syntax. The library went so quickly that I was able to integrate the functions in that library with my tilt-compensated compass drivers and create finished functions for measuring heading. I did a little bit of testing and it seems to work very well.

A month or so I ago I also did some work with a friend on servo control programming. We decided that the best way to go would be to use a library that someone else had created for doing the control functions. It does exactly what we need, and somebody already did the work for us!

So that is 4 significant parts of the programming(compass/accelerometer driver, tilt compensation, sensor smoothing, servo driver) that are effectively done. Still remaining to do are:
  • wind direction sensor driver (should be easy)
  • GPS driver
  • navigation
  • rudder control algorithm
  • sail position control algorithm
  • over-arching control loop
The only one of those that I anticipate being challenging is the GPS driver, so the programming is starting to look manageable. There is still a good amount of time that needs to be put in, but it doesn't seem too daunting anymore.