Skip to content

Let there be (LED) light!

August 30, 2009

At the moment, K-9 sits, completely disassembled, in my garage. When he was last in the house (in July), the kids knocked him around a little bit and I decided he needed he needed a protective coat of polyurethane. The first coat is on. He needs a good sanding and a second coat.

Unfortunately, with work and family and vacations I haven’t been able get back to him. But I was able to start playing with the Arduino micro-controller I bought a few months ago. I’d like to use this as the interface between motors, sensors and the “brain” – an old 12-inch 1Ghz PowerBook G4 running OSX 10.5. But before I even think about which motors make sense, I wanted to make sure I could get my laptop to talk to the board. It wasn’t hard, but requires custom code on the Arduino to send data over the serial port and listen for instructions. After doing some research I stumbled upon a project called Firmata that provides a standardized way to do just this. I couldn’t figure out the MIDI-based message syntax Firmata uses at first. But a gentleman by the name of Andrew Craigie, on the Arduino forum, helped me work through that. (And I NEVER would have figured that out on my own. Thank god for “the internets.”)

With Andrew’s insight and a little effort, I wrote a little REALbasic application that can turn on and off an LED connected to a digital I/O pin on the Arduino. Exciting, I know…. I’ve created a four pound light switch! But genius starts with small steps. I want to make sure I have the details down correctly by setting this up to simultaneously control multiple LEDs. Then I’ll hook up some of the switches on K-9’s control panel to make sure I can listen properly… oh, and wire up the switches, board and computer in such a way that I don’t blow anything up. Details, details. 🙂


From → K-9

One Comment
  1. Leo Post permalink


    Excellent work on the K-9! Wish I were that far on developing…

    I am trying to get the firmata – realbasic – arduino working, but it just won’t work, I am really new in this. Is there a way you could help me on this? It would really be helpful if I could have a look at your Realbasic app, and which firmata app are you using on the Arduino?

    Thanks! Leo

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: