BlinkM Hello, Video Guides, Example Code

This is a BlinkM:

BlinkMs are “smart LEDs”, a type of smart interface component. A BlinkM consists of an ultrabirght RGB LED backed with a microcontroller with built-in knowledge about 24-bit color spaces, color fading, and color pattern generation. All in a package 0.6” wide. You talk to it over I2C, a serial protocol spoken by many different things. (Arduino speaks it, as do Basic Stamps, and your PC) And you can have over 100 BlinkMs on the same serial bus, each individually addressable. Here’s how they can hook up to an Arduino:

BlinkMs are available from SparkFun (US) and Little Bird Electronics (AU). It’s hard to show in just static pictures how fun and easy it is to play with BlinkMs, so here’s a few quick video guides.

Video Quick Start Guide

A video version of the BlinkM Quick Start Guide.

Playing with BlinkMTester

A demonstration of one of the example Arduino sketches “BlinkMTester”, which lets you exercise a BlinkM by typing simple commands to the Arduino.

Exampe Code

There are a couple of examples of how to talk to BlinkMs all zipped up in BlinkM_Examples.zip. You can also peruse them unzipped if you like. The examples are predominately for Arduino currently, but any I2C master will work. Some of the examples so far:

  • BlinkMCommunicator
    A simple serial-to-i2c gateway for PC controlling of BlinkM (for instance via Processing or the BlinkM Sequencer)
  • BlinkMTester
    A general tool to play with a single BlinkM
  • BlinkMMulti
    An example showing how to communicate with multiple BlinkMs
  • BlinkMScriptWriter
    A demonstration of how to write BlinkM light scripts with Arduino
  • BlinkMChuck
    Control the hue & brightness of a BlinkM with a Wii Nunchuck

More examples will be added periodically.

For the Arduino examples, a convenience library called BlinkM_funcs.h has been created. Just drop this .h file into your sketch folder and call the functions to start playing with BlinkM.

The complete list of functions is below, though you’ll probably only use a few of them for a particular project.

BlinkM_begin();
BlinkM_beginWithPowerPins(byte pwrpin, byte gndpin);
BlinkM_beginWithPower();
BlinkM_sendCmd(byte addr, byte* cmd, int cmdlen);
BlinkM_setAddress(byte newaddress);

BlinkM_setFadeSpeed(byte addr, byte fadespeed);
BlinkM_setTimeAdj(byte addr, byte timeadj);

BlinkM_fadeToRGB(byte addr, byte red, byte grn, byte blu);
BlinkM_fadeToHSB(byte addr, byte hue, byte saturation, byte brightness);
BlinkM_setRGB(byte addr, byte red, byte grn, byte blu);

BlinkM_fadeToRandomRGB(byte addr, byte rrnd, byte grnd, byte brnd);
BlinkM_fadeToRandomHSB(byte addr, byte hrnd, byte srnd, byte brnd);

BlinkM_getRGBColor(byte addr, byte* r, byte* g, byte* b);

BlinkM_playScript(byte addr, byte script_id, byte reps, byte pos);
BlinkM_stopScript(byte addr);
BlinkM_setScriptLengthReps(byte addr, byte script_id, byte len, byte reps);
BlinkM_writeScriptLine(byte addr, byte script_id, byte pos, byte dur,
                                byte cmd, byte arg1, byte arg2, byte arg3);
BlinkM_writeScript(byte addr, byte script_id, 
                          byte len, byte reps,   blinkm_script_line* lines);

And More

For more information, including a datasheet, example code and sequencer application for Mac/Windows/Linux visit blinkm.thingm.com.

If you want to talk about BlinkM, leave a comment or participate in discussions on ThingM’s Satisfaction page.

WineM lights, a BlinkM predecessor

With BlinkMs available for purchase soon, I figured it would be neat to show what a large collection of them can do. BlinkMs were created from my desire to have a “smart LED” that did its own tri-color PWM. I didn’t want to build a real-time system to control the PWM of several hundred RGB LEDs. And existing LED controllers didn’t meet my needs. I wanted something that knew a bit about color and color patterns and could be networked together into clusters. Thus BlinkM. A single BlinkM is fun, but the real utility is seen when you have several of them on the same I2C network.

Below are two movies of the lighting system in WineM, our smart RFID winerack. Each place a bottle goes contains a essentially BlinkM and RFID reader controlled via an I2C master.

WineM prototype at NextFest


This video shows WineM in use. A handheld web device allows one to select and display different facets of the wine collection. In the video, first all wines are shown, colored by varietal, then Cabernet wines are selected. Within the Cabernets, color them by year. Select 2002 as the year and only the 2002 Cabernets are shown. Then color those by price. Finally, select the 2002 cabernets that are between $20-$30. You’re left with the perfect wine for tonight’s meal. Also shown is the visual indication when bottles are added or removed.

WineM prototype light tests


This is just a light show using the WineM lights. It was taken right after I had assembled and installed everything in the rack. Apologies for the exposure fluctuations.

For a bit more detail on the WineM prototype hardware, see this post.

Things at ThingM, my Berkeley INFO290-13 talk

On Nov 8th I was a guest lecturer at the “Theory and Practice of Tangible User Interfaces” class at UC Berkeley. It’s a physical computing course, about “a new approach to HCI which focuses on the physical interaction with computational media.” The class has both lecture and lab components. The lab section is hands-on experimenting with novel physical interfaces, using Arduino as the core. So of course I have a great fondness for the course.


things at thingm

The talk itself was a sort of summary of the things we’ve been pondering at ThingM. If you’re already familiar with the stuff Mike and I have been talking about for the last several months, there’s not much new. But for me it was interesting to put it all together into one package and attempt to construct a narrative that threads it all together. The talk covered:

  • Computation as Material
  • Smart Interface Components
  • Reversible Hacking
  • Technology Sketches
  • Informational Objects

Before my talk I got to see the in-progess work of the students’ final projects to create new kinds of musical instruments using a variety of input devices, Arduino, Processing, and so on. It was great. I was invited to be a guest lecturer by fellow Sketcher Kimiko Ryokai, an assistant professor at Berkeley’s School of Information. Thank you, Kimiko, for letting me be a part of your class and to meet your students. The class was 40 strong and it’s obvious there’s a lot of interest in the process of making software interact with the real world. I hope more schools follow in this one’s path.

The PDF of my slides with notes is here:
berkeley_info290-13_todkurt.pdf (8.8MB PDF)

WineM prototype at NextFest

WineM solves the problem of remembering all the information about the wines in a large wine rack, cellar or cabinet, or searching through that data. This smart wine rack makes that information always accessible and updatable.

ThingM will be at Wired’s NextFest conference, showing off a prototype of our WineM product. Come visit us if you’re in LA!

You can even read a press release about WineM.

WineM has a bank of RGB LEDs for every cell a bottle can go in. Each cell has a microcontroller implementing a high-power variant of a SmartLED.
There are 576 total LEDs in the WineM prototype, controlled by 52 microcontrollers, bussed together over an I2C bus.

Here’s a little video showing the cell lights in action.


WineM lights test 1

The electronics in each cell look like (click for more details):

Standard through-hole components were used since space wasn’t an issue.

Each cell also has an RFID antenna to recognize the RFID tags on the wine bottles. This lets you recognize which wine bottle is in which cell. A controller board holds the RFID reader and controls up to 12 cells. Four controllers are linked together to in the WineM prototype to control the entire rack:

Smart Interface Components, my Sketching07 talk

sketching-head.jpg

The Sketching in Hardware 2 conference was a blast. So many interesting people and ideas. I wish we could have it every few months. Mike has his notes and a good summary of this year’s Sketching.

My talk was on “Smart Interface Components”. It was a generalization of the things I’ve been thinking about with the Smart LED prototypes.

sic-title2.jpg

Slides from the talk: sketching07-tod-smartcomponents.pdf

What are Smart Interface Components? Current interface components, the sensors and actuators that comprise the user interface of the gadgets we use, are dumb. They require specialized domain-specific knowledge to make work correctly, non-trivial processing to use, and in general are a pain. Tiny microcontrollers are becoming cheap enough to embed even at the edges of our hardware designs. A component with local brain can embed some of the domain knowledge and enable a higher level of communication between it and the application processor.

An example presented is a Smart LED. LEDs are dumb. Multi-color LEDs are hard to control. Can we make it better?
sic-rgbled.jpg

Imagine an LED that instead of worrying about PWM and current-limiting resistors, you just give it the HSV or RGB color values via a serial line? “#FFCC22 @ 20% brightness”, you say.

Some prototypes (from the flickr set):
sic-protos.jpg

Work is continuing in making production versions of these smart LEDs.