Last active
August 29, 2015 14:06
-
-
Save dave5623/fcf0793ad5a850799371 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
int toggle = 0; | |
void setup() | |
{ | |
Wire.begin(); | |
} | |
void loop() | |
{ | |
Wire.beginTransmission(0x09); // I2C address of the BlinkM | |
Wire.write('h'); // fade to HSB color | |
if (toggle % 2 == 0) { | |
Wire.write(0x00); // hue value for red | |
Wire.write(0x10); // saturation value | |
Wire.write(0x01); // brightness value | |
} | |
else{ | |
Wire.write(0x55); // hue value for green | |
Wire.write(0x10); // saturation value | |
Wire.write(0x01); // brightness value | |
} | |
Wire.endTransmission(); | |
toggle++; | |
delay(3000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment