Magnetometer IV: Code Size

Last time, I presented a working proof-of-concept of a digital compass based on a three-axis magnetometer. That version was running in userland on a Raspberry Pi running Raspbian, which is a whole lot more computer than the Atmel ATtiny85 I eventually want to target. It was also coded for clarity rather than for speed or size.

In this post, I’ll look at some quick-and-dirty ways to estimate program size for an AVR version (as well as some simple things we can do to save space). Read on for more.

Magnetometer III: Working Prototype


In previous posts, I talked about a method of transforming magnetometer readings to compass headings, then experimented with using those transformations on real (but static) data. In this post, I’ll present a working prototype of a vehicle compass using the methods I discussed earlier.
Read on for more details.