beautify code and add a few fixes

master
shark 6 years ago
parent d9733c95c0
commit daf46856eb

@ -6,6 +6,7 @@ int b = 11;
int oldavg = 0;
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
@ -105,7 +106,7 @@ byte BlueLight;
byte h = hue;
byte s = 255;
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 f = (h % 32) * 8; // 'fractional' part of 'i' 0..248 in jumps

Loading…
Cancel
Save