|
|
@ -6,6 +6,7 @@ int b = 11;
|
|
|
|
int oldavg = 0;
|
|
|
|
int oldavg = 0;
|
|
|
|
void setup() {
|
|
|
|
void setup() {
|
|
|
|
Serial.begin(9600);
|
|
|
|
Serial.begin(9600);
|
|
|
|
|
|
|
|
pinMode(13, OUTPUT);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void loop() {
|
|
|
|
void loop() {
|
|
|
@ -105,7 +106,7 @@ byte BlueLight;
|
|
|
|
byte h = hue;
|
|
|
|
byte h = hue;
|
|
|
|
byte s = 255;
|
|
|
|
byte s = 255;
|
|
|
|
byte v = 60;
|
|
|
|
byte v = 60;
|
|
|
|
h = (h * 192) / 256; // ..191
|
|
|
|
h = (h * 192) / 256; // 0..191
|
|
|
|
unsigned int i = h / 32; // We want a value of 0 thru 5
|
|
|
|
unsigned int i = h / 32; // We want a value of 0 thru 5
|
|
|
|
unsigned int f = (h % 32) * 8; // 'fractional' part of 'i' 0..248 in jumps
|
|
|
|
unsigned int f = (h % 32) * 8; // 'fractional' part of 'i' 0..248 in jumps
|
|
|
|
|
|
|
|
|
|
|
|