BlinkMKnobHue sketch
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 } CommentsWould you like to comment?Sign up for a free account, or sign in (if you're already a member). |
[?]
TagsAdditional Information
|
weevil
says:
Doesn't the maxm kind of eclipse the blinkm?
Posted 6 months ago. ( permalink )