Easy Networked Games with sim-sim-js

A long while ago, I wrote a simultaneous simulation networking library to simplify making multiplayer games in Ruby. Dave Crosby later made a port of the library, called sim-sim-js, for JavaScript, making it much easier to create real-time multiplayer games in the browser.

This short tutorial will show you how to get started making awesome networked games in the browser with sim-sim-js. Read more on Easy Networked Games with sim-sim-js…

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…

Setting Up a Raspberry Pi without a Monitor or Keyboard

There are a lot of how-to’s online describing ways to set up a Raspberry Pi without a monitor or keyboard, but none of them are simple or straightforward. This will be.

I’m going to walk through how to do this on a Mac, but something like this should also work on Windows using internet connection sharing and the Event Viewer. Read more on Setting Up a Raspberry Pi without a Monitor or Keyboard…

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…

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…

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…

Trying out Rust – Packages, Upgrades, & Security

I’ve been getting started learning the Rust language, and thought I’d share some my initial take-aways.

I’m an embedded developer, and most of the code I write for work is in C. As I’ve mentioned before, I’m particularly interested in Rust as it’s a systems language that might one day be a suitable replacement for C/C++ in my everyday work. Read more on Trying out Rust – Packages, Upgrades, & Security…

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…