You aren't signed in     Sign In    Help

BlinkMKnobHue sketch

BlinkMKnobHue sketch by todbot.
A regular BlinkM and a BlinkM MaxM doing the tango.

The sketch that controls the BlinkMs is pretty short:

#include "Wire.h"
#include "BlinkM_funcs.h"

const int blinkm_addr = 0;
const int hue_pot_pin = 0;

void setup()
{
BlinkM_beginWithPower();
BlinkM_stopScript(blinkm_addr); // turn off startup script
}

void loop()
{
// read the hue pot, values range from 0-1023, blinkm's 0-255, thus /4
int hue_val = analogRead(hue_pot_pin) / 4;
// set blinkms with hue; brightness & saturation is max
BlinkM_fadeToHSB( blinkm_addr, hue_val, 255, 255 );
delay(50); // wait a bit because we don't need to go fast

Comments

view profile

weevil  Pro User  says:

Doesn't the maxm kind of eclipse the blinkm?
Posted 6 months ago. ( permalink )

Would you like to comment?

Sign up for a free account, or sign in (if you're already a member).

[?]
view photos Uploaded on June 26, 2009
by todbot

todbot's photostream

1,378
uploads

This photo also belongs to:

BlinkM MaxM (Set)

40
items

BlinkM (Set)

51
items

Tags

Click this icon to see all public photos and videos tagged with rgb rgb
Click this icon to see all public photos and videos tagged with led led

Additional Information

AttributionNoncommercial Some rights reserved Anyone can see this photo

Add to your map