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.
Tag: Compugeekery
Magnetometer II: Real Data
In a previous post, I speculated about a method of converting magnetometer readings to compass headings using affine transformations (specifically, three elemental rotations). In this followup, I’ll gather some real data, then see how those transformations actually work in the real world. Read on for details.
Magnetometer Reading to Compass Heading
I’m working on building a digital vehicle compass, using the Honeywell HMC5883L three-axis magnetometer as a sensor. Answering the question “Which compass direction am I facing?” from the raw sensor output data is somewhat more complicated that you might expect. This is especially true when using a microcontroller like the ATTiny85 with extremely limited memory. Read on for a discussion of the problems involved and my solutions.
I2C with ATTiny85 on Adafruit Trinket
The Trinket microcontroller from Adafruit Industries is a tiny and inexpensive (US$8 for a single unit) way to control your electronics projects. One of the coolest things about it is that you can do I²C (and communicate to lots of inexpensive sensors and displays using only two pins) and still have plenty of room left over for your code in the ~5.5KB of flash on board.
Read on to see an example of how to do I²C communication on the Trinket (or anything with an Atmel ATTiny85) while shaving every possible byte. Also included: driving the Adafruit Mini 8×8 LED Matrix with I2C Backpack.
BeagleBone Black PRU: Hello World
This article presents what is meant to be the simplest possible example of using the PRU (programmable realtime unit) on the BeagleBone Black single-board computer. The example program has no inputs and no outputs; it does nothing other than delay for a fixed duration then exit. Read on after the jump…
Pogoplug SAN using AoE
The Pogoplug E02 is a Linux-capable embedded computer with gigabit Ethernet and USB connectivity. It can be found quite cheap (US$35 or so) on the secondary market. As it was originally sold as a storage appliance for home users, it ships with somewhat inflexible factory firmware. However, it is reasonably easy to replace the bootloader with one which can boot an arbitrary Linux distribution.
Once I got my Pogoplug running Debian, it was surprisingly easy to set it up as network storage using ATA-over-Ethernet. Details after the jump.
Raspberry Pi, GPS and NTP
The Raspberry Pi is an inexpensive ARM7-based single-board computer that runs Linux. Using it, together with an almost-equally-inexpensive GPS receiver module from Adafruit Industries, I was able to set up a reasonably good NTP server for my home network. While the hardware side was almost ridiculously easy, the software required a bit of effort, including building a custom kernel and building ntpd from sources. Full details after the jump.
Ubuntu 12.04.1 LTS: Recovering from a Broken libc
Note: Reasonably heavy UNIX-geekery ahead. Mostly Linux-specific, somewhat Debian-specific and a little bit Ubuntu-specific. Skip if that isn’t your cup of ichor.
I recently did something incredibly ill-considered while logged in (as root, natch) to my Ubuntu server box at home. In essence, I told the package manager to uninstall libc.
On a scale from good to bad, this is bad.
Now, I could have booted up from a rescue disk and fixed it. I could have re-installed easily enough (using the trick where you just keep your existing partitions and don’t format them — though this would have inevitably led to some fallout as various config files and customizations got clobbered). Heck, I even had a reasonably recent backup at hand. None of these sounded especially fun, mostly because the machine was in a place where it’s a hassle to stick a head on it. I had three things working in my favor: an open root-privileged shell prompt, Internet connectivity and my native cunning.
Read on after the jump for the full tale.
Karotz: Movies Application
The Karotz (née Nabaztag) is an Internet-connected embedded system in the form of a stylized mechanical rabbit. I received one of these as a gift, and it’s actually kind of cool. It lacks any kind of display (other than a single multi-color LED), but does have such amenities as a camera, microphone, RFID reader, motorized ears, robust text-to-speech and a Javascript API.
My first application for the Karotz is called Movies. It scrapes the Google movie listings, and reads you upcoming titles and showtimes for the theater of your choice. Full source download and additional discussion after the break.
Cheap Self-Programming AVR Proto Board
There are lots of proto boards for the AVR microcontroller, and lots of programmers. This post presents my approach, which features easy assembly, off-the-shelf PCB, extremely low parts cost and a built-in USB-based programmer. Circuit, PCB and firmware are all completely Open Source. Read on after the jump for details.