First Impressions of a $9 CHIP Computer

Almost a year ago, I participated in a Kickstarter for a $9 computer called CHIP. It’s similar to a Raspberry Pi, but with a few interesting differences. And surprisingly, it’s much cheaper.

I was a little skeptical. A lot of these projects end up as vaporware, and $9 is almost too cheap to be believable. But a few months later, my CHIP came! And it’s actually pretty sweet. Read more on First Impressions of a $9 CHIP Computer…

Uploading Files in Rails’ Active Admin

I recently wanted to be able to upload a small file and then store it as a field in the database via an Active Admin interface in a Rails app. The solution is pretty simple, but it was tricky to figure out.

In my case, the file was a small piece of firmware. For this example, we’ll have a simple table with only two interesting columns containing the name of the file and the contents of the file itself. Read more on Uploading Files in Rails’ Active Admin…

Monte Carlo Tree Search for Game AI

I have recently been implementing an Othello AI using the Monte Carlo Tree Search (MCTS) algorithm. One of the super cool things about MCTS (and actually the main reason I was attracted to it) is that you can use the same core algorithm for a whole class of games: Chess, Go, Othello, and almost any board game you can think of.
Read more on Monte Carlo Tree Search for Game AI…

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…