WHC 1: Triple axis accelerometer + Bluetooth = fun!

posted Jan 27th 2007, 00:42 under bluetooth, processing, WHC

For this project, I decided that a weekly hardware challenge (WHC) would be a good way to start prototyping early and keep motivated about it. It doesn't have to be complicated, but do a least one hardware step, evolution or implementation per week. I don't how good I will be able to stick to this plan, but I'll try my best.

Earlier this month, I ordered a lot of new electronic devices and sensors. Some of them arrived promptly in Sweden, others are still in transit unfortunately. For this first instalment of the WHC, I spent a bit of time to check out some of the little gems I received so far and decided to go with the WiTilt from Sparkfun. This item is a triple axis accelerometer combined with a Bluetooth module. It is very similar to the Nintendo Wii Remote. The acceleration measurements are transmitted over a wireless Bluetooth link, for true mobile and clutter-free operation. The unit can easily be configured from a terminal console: sensor range, output format (ASCII or binary), active channels, refresh rate, etc. All this means that this module can be interfaced with pretty much any software or hardware package, with relative ease.

I decided to build a quick mockup in Processing because it has built-in 3D library. The idea was to use the accelerometer values to determine the orientation of the unit in space. I had some troubles parsing the ASCII strings sent in the serial stream (others had a similar problem). After couple hours of growing frustation, I decided to switch to the binary format and was ultimately sucessfull in parsing the values. Here is the result I have for this first hardware challenge.