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.
Posts Tagged Compugeekery
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. Read the rest of this entry »
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 8x8 LED Matrix with I2C Backpack. Read the rest of this entry »
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...
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.
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.
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.
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.
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.
This post isn't about the usual kind of dragon (if there even is a "usual" kind). The AVR Dragon is a gizmo made by Atmel, useful for programming their AVR line of microcontrollers. It's relatively cheap (around US$50 at the time of this writing) and does many useful things. The specific application I'm going to talk about here is using it to "fix" parts when you've set the fuses in such a way that said parts won't talk to simpler programmers. Details after the jump.