Skip to content

Programming Interactivity: A Designer's Guide to Processing, Arduino, and openFrameworks

October 23, 2009

I just stumbled upon this interesting sounding book by Joshua Noble:

Programming Interactivity: A Designer’s Guide to Processing, Arduino, and openFrameworks.

A few of the topics covered: Basic C, Processing, openFrameworks, Gesture and touch recognition, Motors and Servos, LEDs and LCDs, LilyPad and many more! - Wow, that’s sounds promising - wanna have!

mtXcontrol wins the Seeedstudio Rainbowduino Carnival

October 22, 2009

Yay - the voting for the Seeedstudio Rainbowduino Carnival Competition is over. And, guess what, my project mtXcontrol made the run - I won the first price! Yipheee.. that’s 12x Rainbowduinos + 100$ Shopping voucher which I’ll invest in buying Xbee Stuff.. Can’t wait to get my hands on! Stay tuned…

Thanks to everybody voting for my project!

Btw. I just released the latest version 1.02 with some bugfixes and new features in the API…

Rainbowduino Carnival Competition Voting has started

October 07, 2009

As mentioned in earlier post, I submitted the first public version of mtXcontrol to the Rainbowduino Carnival Competition by Seeedstudio. Now it’s time to vote for the best projects:

Express your opinion!

I know, the decision will be quite hard, as a lot of other cool projects were submitted as well. Like this cool Daft Punk Helmet or this nice lipsync speaking Robot

Please check out the Raindrop Rainbowduino Game by my friend ccb23 as well. It’s a Rainbowduino connected via I2C to an Arduino with an Accelerometer. With that you can move the red dot on the Matrix and avoid hitting the falling blue raindrops. nice!

Make your vote!

mtXcontrol 1.0 released - as contribution to Seeedstudio Carnival Competition

October 06, 2009

As contribution for Seeedstudio Carnival I’m proud to release the version  1.0 of mtXcontrol today. It’s feature list extended quite a lot, beside new frame editing features like Frame moving and Copy & Paste, it now comes with Letter / Number placer to easily draw characters. Additional the frame preview bar makes it easily to navigate between the frames. As of this, it was time to get an proper UI with lot’s of buttons for those who couldn’t remember all those keyboard shortcuts (like me ;-))

So check out this Demo:

Check out it’s new project page with details, video and sources to download:

Understanding the Rainbowduino Controller by Seeedstudio

October 02, 2009

As you may know, I’ve orderd a Rainbowduino from Seeedstudio. They delivered quite fast and I’m very happy of the price/quality/functionality ratio. In my opinion, the Rainbowduino is the cheapest ready-to-go 8x8 RGB LED Controller Set at the moment - for just 43.4$ ( 19.90$ Board + 23.50$ Matrix) you are set for taking of!

My first tests went quite well. The Rainbowduino comes with a ready to use the program/sketch which allows you basic controls via I2C bus easily, like writing letters & lines in different color and light strength. But soon I hit the limits when it came so single control each LED to my will. So no doubt, I had to dig deeper in understanding how to control the Rainbowduino. Here a short summery of my results:

To understand how the Rainbowduino works, I kind of reverseengineered the sketch by seeedstudio which came with the controller. As usual for driving those Matrixes, PWM is used as basic concept. This means the frame image is created row by row by high frequency, so human eye puts it all together to one single image.

To simplify this process I created the Rainbowduino.h Library, which comes with some nice methods to set frames and draw those to the Rainbowduino. It’s part of the mtXcontrol firmware an can be downloaded from github

How it works:
To tell rainbowduino which row to draw the method ‘open_row’ is called. As each row is represented by a one output PIN, this method sets the according PIN to high, all others to low. Unfortunately the row pins are not all on one port: rows 1-3 are on PORTB Bit 1-3, rows 4-8 are on PORTD Bit 4-8. This makes the method kind of bit ugly ;-)

After the row is selected, its time to set the pixels. One pixel consists of 3 LEDs: red, green & blue. Each LED has to be separately to high or low to mix the final color (e.g. red + green is yellow). First all blue values of a row are set, then red and finally green. This happens in serial on PORTC. First bit is the value input, second bit is clock, bit 3 the write mode bit and bit 4 to display the shifted value. Call the method ‘draw_row’ to display a row. First parameter is the row number (0-7), second the intensity (1-16) and then the red, blue & green values for the row. e.g passing the color values 1,0,0 would light the first pixel red and all other off, where as 255, 255, 255 would light up all LED and all colors, to the full row would be white.

To store the row values the Library comes with a frame buffer for 10 frames. (That the amount of frames we can store to EEPROM without compression as well). You can pre fill the buffer and set the frame number to display. By calling draw() the frame of the current _frame number is drawn.

It makes sense to call this function by a timer interrupt to not disturb your actual program progress and to ensure it’s call in regular frequency to avoid different display colors.

To set up the timer, include this in your code:

Rainbowduino rainbow = Rainbowduino(10); //max 10 Frames

void setup_timer() {
TCCR2A = 0;
TCCR2B = 1<<cs22></cs22> TIMSK2 = 1<<toie2></toie2> TCNT2 = 0;

ISR(TIMER2_OVF_vect) {

Now, just fill you frames with

rainbow.set_frame(0, *data);

and your’re ready to go. Have fun!

First tests of the library with earlier version of mtXcontrol, an Editor to create images on the Matrix easily:

Stay tuned for more examples soon…

Nabaztag:tag arrived - meet Nabaccia!

September 29, 2009

Yay, my new toy has arrived: It’s a Nabaztag. Short story: I first met the rabbit in 2007 at re:publica conference @ Berlin, and always want to have one since then. Nabaztag is a rabbit connected to the Internet with moving ears, 4x color LEDs, a RFID reader, a button and Sound In & Output. It’s hard to understand why one wants to have such rabbit, but the idea to connect things with the internet sounds very interesting to me. But just for playing around, it was to expensive … till now!

Sadly (well, luckily for me) Violet, the producer of Nabaztag, is on it’s way to bankruptcy. As of this MyRobotcenter started selling them half price - nice! I couldn’t anymore resists buying and got the rabbit+mirror+zstamps for a good price - that’s all right!

According to violet, each thing needs a name, so mine is called Nabaccia , listens to emails via nabaccia - and, of course, twitters here as well. So, now it’s time to hack the rabbit. I saw a couple of interesting project out there, let’s get it on! More on this soon!

I know it’s totally wired and hard to understand why, just don’t ask ;-)

Image by Liron - thx!

Rails flag_shih_tzu Plugin with named_scope

August 20, 2009

When it comes to store a load of boolean data into your model you easily end up with lots of columns which blow up your table unnecessarily. The developers at Xing solved this problem with a nifty Rails Plugin called flag_shih_tzu. The trick is to store all boolean values combined as a bit vector, which allows you to put up to 32 values (4Byte) within a single Integer column. Automatic generated access methods allows you to deal with you model as your are used to. Wanna see an example? (Taken from plugin docs)

class Spaceship < ActiveRecord::Base
include FlagShihTzu

has_flags 1 => :warpdrive,
2 => :shields


enterprise =
enterprise.warpdrive = true
enterprise.shields = false

enterprise.warpdrive? #=> true
enterprise.shields? # => false

Nice, isn’t it?

Unfortunately named scopes where missing for selecting models easily. So another github fork, another fix, and here were are. Now this works as well:


Check it out here:

Update: replaced ‘routes’ with ‘scopes’ - I’m getting confused with that all the time, how come!? ;-)

Quake like Terminal on Mac OS X: Visor Plugin

August 14, 2009

Sure you do remember Quake. And sure you di remember how cool the console faded / slided in from the top? Image this would be available for your Mac OS X Console/Terminal. Well now (actually since ages, but I just forgot to mention ;-) it is. As small SIMBL plugin called Visor Plugin allows to to bring up the Terminal via a hotkey in anytime. I really love it and can’t without it anymore.
Check it out here:

Extending Active Scaffold as_paperclip_bridge to delete & update image/attachment

August 13, 2009

As you know I’m quite fond of working with Active Scaffold (AS) for data administration proposes. Quite recently we moved over to the RoR paperclip attachment plugin for file upload handling. I was even more happy to see a Active Scaffold bridge which integrates paperclip smoothly into AS as well. It’s created by and hosted here on github.

Unfortunately it didn’t provide the possibility to delete or update an image once it’s assigned to an object. Well no problem, another fork of mine, some coding and now it possible. I basically reused to code of the as_file_column_bridge. Check it out here:

Update: changes got merged into trunk, check it out:

Stealth Project on a Nova 10x10x10 LED Cube

August 10, 2009

Hey guys, look at this: I just found this awesome project by Squidsoup. They put up a 10x10x10 LED Cube “NOVA 3D LED” (yes, 3 dimensions, yes that’s 1000 single controlled LEDs) and created cool stuff like webcam projection or a the “Stealth Project” , a game similar to Battleships. Just get it’s great sounds and projections:

More on this here:


Beginners Guide to Arduino - free PDF Download

July 30, 2009

Earthshine Design just released a free Beginners Guide to Arduino as PDF download.

Feel free to grab it here: Earthshine Design Arduino Starters Kit Manual.

It covers several experiements you’ll start your Arduino career with, especially you’ve bought thier very complete starter kit. Go for it!

[found via]

RainbowDuino here it is! (and how to program it)

June 25, 2009

Yay - I finally got my RainbowDuino. Unluckily I did sth wrong with the external power connection (JST 2 pin jack) and smashed a capacitor. Maybe the polarity was wrong or it couldn’t stand the 12 volts? But luckily no damage to the main system so it still works using the terminal connector (right through the 5volts of the Arduino). *phew*

The first real basic problem I ran into was how to program the Rainbowduino as there’s no USB connector and I don’t have an UART interface.
But well, nothing simpler than that: Just connect your Arduino’s Tx,Rx,GND,Reset and Vcc ports with those of the Rainbowduino, choose the right controller type in your IDE and program it as usual - works perfect for me!

Check out my Rainbowduino Editor mtXcontrol here - it’s an easy way to draw shapes on your rainbowduino!

Btw. DTR on Rainbowduino is Reset on Arduino

Sorry I forgot to mention, this trick does NOT work if your host arduino is a ATmega168 - you need an ATmega328 to pass serial communication through. Before that, make sure you upload this blank sketch to your host Arduino first:

/* blank sketch to upload on Arduino */
void setup()

void loop()


And, as multiple times requested, a picture of my complete setup:

Make sure you’ve selected the switch right. It has to point to the same side as the green Terminal connectors are. If you power rainbowduino through the white JST jack, flip it!

MySQL: How to swap entires of two columns with just one query

June 24, 2009

Check this out, I found out a really nice way how to swap values of two columns with just one query, using user defined variables. Given a table with two columns a and b. To swap their values in whole, use this query:

UPDATE my_table SET a=@tmp:=a, a=b, b=@tmp;

Done! Isn’t that easy?

Pimp my TextMate: how to speed up search & load

June 18, 2009

As a true Ruby on Rails developer you probably work with TextMate, as it’s a plain, simple, but yet quite powerful editor. I love its open-file-by-pattern (?+T) or find-in-project (?+?+F) functions. But one thing which bothered me the most was the search time when working on big, large, massive projects. One easy tweak how to speed it up easily is to extend the file and folder exclude patterns. For example you don’t need the tmp, log or vendor folder, nor any binary files within your editor. So I just excluded them, here are my new patterns (all in one line):

Files: (excluded all images,pdf & flash)

Folders: (exclude tmp tools vendor uploads lang locale po old_migrations script images upload custom_maps log)

To change the settings go to
preferences -> advanced -> folder references

Yeah, now my search is quite fast again!

RainbowDuino - I'm comming

June 11, 2009

Yeah! Just ordered a bunch of stuff from the Seeedstudio Shop, my new favorite Arduino parts dealer. I’m really looking forward to get the RainbowDuino into my hands. I’ve already order thier 8x8 RGB LED Matrix at ebay which is really promissing… Unfortunately they are located in china to shipping takes ages ;-( More soon to come ….