Thursday, August 11, 2011

prototyping the netlogicdc logo sign

Our company is moving to a new office, and needs a new sign for the entranceway. I'm sketching out some ideas with Tek, who's designed the logo and the build out for the new office. I'm prototyping with the BlinkM smart LED from ThingM. Here's a quick video of a simple the arduino and BlinkM circuit, and the concepts.

Our logo and motif is green, and I like the idea of a pulsing light. Currently the code fades the light in and out. I plan for it to evolve and incorporate a sensor that will detect if someone walks into the entranceway, and the  light will pulse brighter, or change in a similar interactive way. The coolest part is that it could change, it doesn't have to be the same thing each day.


I programmed the Arduino with BlinkMFlash example code, and edited the code for this example. I've posted the code after the break:



/* BlinkMFlash --
 * simple demonstration of flashing a BlinkM
 * BlinkM connections to Arduino
 * PWR - -- gnd -- black -- Gnd
 * PWR + -- +5V -- red   -- 5V
 * I2C d -- SDA -- green -- Analog In 4
 * I2C c -- SCK -- blue  -- Analog In 5
 * *
 * 2008, Tod E. Kurt, ThingM, http://thingm.com/
 */
#include "Wire.h"
#include "BlinkM_funcs.h"
int breathDelay;
int blinkm_addr = 9;  // default address of a blinkm
void setup()
{
  BlinkM_beginWithPower();
  BlinkM_stopScript( blinkm_addr );  // stop startup light script
  BlinkM_setFadeSpeed( blinkm_addr, 0x02 ); //Set fade to 10
}
void loop()
{
  breathDelay = random(2000,4000);
  BlinkM_fadeToRGB( blinkm_addr, 0x00, 0x00, 0x00 ); // go dark
  delay(breathDelay);
  BlinkM_fadeToRGB( blinkm_addr, 0x00, 0xcc, 0x00 ); // turn full netlogic green
  delay(breathDelay);
}



The BlinkM interfaces with the Arduino very easily. I wired the + and - with the arduino's +5v and GND pins. This arduino sketch assumes that the BlinkM's c pin is connected to the arduino's analog 4 pin, and the BlinkM's d pin is connected to the Arduino's analog 5 pin. This is the setup listed on the datasheet.

As this evolves, I'll post more.


References


thingm :: an electronic product studio: Quick Start Guide
This is Tod Kurt's site, where he publishes all the data on his BlinkMs. There's a datasheet, and several downloads. The BlinkMCommunicator and the BlinkM Sequencer files help you program the BlinkM for standalone operation. You can also check out the Example Code download on the main BlinkM page. This can help you get started making an interactive BlinkM using Arduino. Thanks, to Tod Kurt, designer of the BlinkMs.

Arduino
Prototyping and physical interface platform. Can be used standalone, with many different "shields" to extend its capabilities. The Arduino can also interface with a computer via USB.

No comments:

Post a Comment