So after a bit of searching about on the internets, I found a code example that I can start playing around with, to do a proof of concept of the new prototype controller PCB and it’s orientation sensing capabilities. Initial results are shown below, with only a few minor tweaks needed to get up and running.

Read On…

Just to start with, this code was originally written by Fabio Veresano, a link to his blog is here.  I’m using the version of his code that does the IMU calculations on the ATMEGA itself, rather than offloading the math to the accompanying Processing sketch. I had to make some minor tweaks the stock code to account for I2C address differences in my sensor setup, and mis-matched sensor axes, but with those in place, I was treated to what you see in the video above!

There’s also one minor tweak to make to some of the Processing java files, details here (if you’re seeing “WARNING: RXTX Version mismatch, have a look there). Just a bit more of making sure the latest file versions are in place.

The results are a little shaky, but this is an excellent starting point, and may still prove to be more than adequate for what I’ve got in mind.