Assembling Your Computer’s Brain, Byte by Byte

Computers are amazing machines. They can perform massive amounts of stuff every second, and they’re being put into everything around us to make the things we interact with on a day-to-day basis smarter and better.

This is made all the more remarkable by the fact that computers are astonishingly dumb. My favorite explanation of just how dumb computers are can be found in one of my favorite recorded talks, Richard Feynman’s lecture about computer heuristics. (Start around the 10-minute mark for the particularly relevant bit.)

One of the secrets to making these dumb machines do smart things is the way applications get loaded and executed within your OS. But have you ever thought about who loads the code that loads your code?
Read more on Assembling Your Computer’s Brain, Byte by Byte…

5 Steps to Getting Started with Embedded Programing

I’ve been getting asked the question, “So how would I get started with embedded development?” more and more often lately.

This is actually a really tricky question. It’s not like, “How would I get started with Haskell?” or “How would I get started with Rust?” Embedded development is such a weird and diverse thing that it’s almost like asking, “How do I get started with programming?” except in an alternate universe where 128k is still a lot of RAM. I’m not sure where to even begin.

Read more on 5 Steps to Getting Started with Embedded Programing…

Focus-Handling Methods for Qt Quick StackViews

On my current project, we’re building the GUI in Qt 5. It’s (mostly) open-source, has some really intriguing platform support, and Qt Quick 2 has a fairly advanced model for both keyboard focus and transitioning focus between widgets just with the keyboard.

When I started work on a spike to prove out some ideas I had about using a Qt Quick StackView to structure the navigation of our app, I still managed to run into some problems with transitioning focus between widgets. Read on for my solution. Read more on Focus-Handling Methods for Qt Quick StackViews…

Generating Rust Bindings for Embedded Libraries

As I talked about in my last post, Embedded Rust Right Now!, you can call C functions directly from Rust without much difficulty. However, you normally still need to provide Rust types and prototypes for the corresponding C types and functions you want to use. This can be a time-consuming and error-prone process.

Fortunately there is a tool call rust-bindgen that can generate bindings automatically directly from C header files! It’s a little trickier when you’re cross compiling to target embedded systems, but you just need to pass some extra clang flags to bindgen. Read more on Generating Rust Bindings for Embedded Libraries…

Rapid Prototypes for Devices with Raspberry Pi

Since joining Atomic, I’ve worked on quite a few web projects, where rapid prototypes are common and quite easy to produce. Unfortunately, not all domains we deal in have such luxuries.

My latest project is a lightweight embedded linux device with a GUI and physical buttons. In such a stack, it can be hard to get rapid feedback cycles on your UI and UX. To try and alleviate this problem, I came up with a method for scripting interaction with rapid prototypes using a display attached to a Raspberry Pi. Read more on Rapid Prototypes for Devices with Raspberry Pi…

Optimize EEPROM Writes Across Pages

Because I’m an embedded developer, I often work on projects where I need to store some data on an extern EEPROM or Flash chip. The internal memory of these chips is usually divided up into fixed sized pages. It’s often the case that you’re not allowed to write more than a page at a time. This makes things complicated if you want to do a write that spans multiple pages. It’s even more tricky if you want to support wrap-around, which turns out to be very handy in certain situations.

Read more on Optimize EEPROM Writes Across Pages…

Protecting the Root Filesystem on Ubuntu with Overlayroot

In certain situations, it is desirable to have a read-only root filesystem. This prevents any changes from occurring on the root filesystem that may alter system behavior, and it allows a simple reboot to restore a system to its pristine state. Examples of such applications include kiosks and embedded devices. Using overlayroot on Ubuntu makes creating a read-only root filesystem quick and easy. Read more on Protecting the Root Filesystem on Ubuntu with Overlayroot…

Getting ROS Indigo Running on OSX Yosemite

I recently worked on a project that made use of the Robot Operating System or ROS. ROS more naturally lives in the linux ecosystem, but for various reasons I wanted a ROS system in my native OSX environment.

I eventually managed to get it working, but it was not an easy task. But I took careful notes and here is the distilled result. Read more on Getting ROS Indigo Running on OSX Yosemite…

Using the Raspberry Pi as a Simple Current and Power Meter

On a recent project I needed to fairly accurately measure current and power consumption of a handful of parts in real time. We needed to measure current in the range of micro amps, so this was actually somewhat tricky.

I could have just used a bunch of super expensive current meters, but I managed to find a much more convenient and cheap solution using a Raspberry Pi. We were already using a Pi to allow for remote debugging, so I went looking for something I could hook up to that.

I found these ADCs:

They plug right into the GPIO headers on the Pi and even come with some python libraries for reading them.

Read more on Using the Raspberry Pi as a Simple Current and Power Meter…