RubyConf 2007: Controlling Electronics with Ruby

Posted in Conferences, Development on July 19, 2008

RubyConf 2007: Controlling Electronics with Ruby

The Ruby community is full of people pushing the limits of technology. Projects like RAGI and Adhearsion enable Rubyists to control their phones; JRuby and Rubinius are exploring new ways of executing Ruby code; and of course Rails started a revolution in web development. I’m going to talk about another class of envelope pushers: the hardware hacking Rubyists.

Hardware hacking (or, more specifically, microcontroller hacking) has long been stuck in the land of C, Assembly, or target-specific languages like JAL. No more! Enterprising hackers have seen the need and addressed it, resulting in a number of ways to control your microcontroller with Ruby.

In this talk, I’ll explore a number of libraries, applications, and techniques for controlling electronic devices from Ruby. Many (most?) of the topics will come along with actual, physical hardware demonstrations. I’ll start with the basics, demonstrating Jim Weirich’s x10-cm17a library for controlling X10 home automation gear.

Next, we’ll take a look at Aaron Patterson’s BetaBrite library for controlling BetaBrite reader boards. RubyConf 2006 attendees may recognize this from a lightning talk given there. We’ll explore some of the techniques Aaron uses to communicate with the board, highlighting the SerialPort library (which will be mentioned later…)

From there, we’ll move on to the Arduino development board. I’ll show off Greg Borenstein’s Ruby Arduino Development project, which provides a Ruby DSL that ultimately generates code to execute directly on the Arduino’s microcontroller. I’ll also talk a little bit about Firmata, which is a combination firmware and protocol that can be used to control Arduino devices from a host computer, instead of with code executing directly on the microcontroller. Firmata uses MIDI to communicate, so we’ll take a brief look at MIDI and the midilib library for MIDI communication.

I’ll wrap the talk up by demonstrating how you can tie everything together, with a little help from some ZigBee wireless radio modules (specifically the MaxStream XBee), and a Ruby library to manipulate them.

Author: Ben Bleything

Watch Video Watch Video Watch Video Watch Video on External Site

Tags: Conferences, Ruby, Hardware, DSL, JRuby, Rubinius, MIDI, Confreaks, RubyConf 2007