All of the source code from this post can be found here.
Part of my goal for working on the blimp project at PyCon this year is to make it easy for other developers to bypass the same stumbling blocks that I dealt with. While my last few posts have somehow incorporated Boost.Python, the real reason that I needed to understand how to use the library was so that I could interface with sensors that were readily accessible using C or C++. For dealing with flight, the main sensors that I needed included an accelerometer, a compass, and an altimeter (I have a separate USB GPS module).
Please note that I haven’t tested this with 100% accuracy at this point
Other Random Stumbling Blocks
- When dealing with the Roboard, ensure that you have root privileges when executing the code. Otherwise you can’t read from the Roboard.
- I didn’t add any sleep() functions directly into the modules. Ensure that you wait at least 100 ms between initializing each read of the sensor.