Added test dictionary: djhgfjh. Changed LED driver.

This commit is contained in:
Max Braungardt
2018-03-26 21:22:43 +02:00
parent abafc41530
commit 4c816c87bf
41 changed files with 28330 additions and 20 deletions

View File

@ -91,8 +91,9 @@ int main(){
// uart_init();
uint16_t min = HUE_MIN, max = HUE_MAX;
uint8_t val = 20, sat = 100;
uint8_t vl = 40;
uint16_t steps = 1;
uint16_t steps = 8;
bool falling = true;
hsv_t colorsHSV[LEDS];
rgb_t colorsRGB[LEDS];
@ -106,7 +107,7 @@ int main(){
//~ right = 180;
//~ }
interpolateLinearly(makeHSV(min, 100, 30), makeHSV(max, 100, 30), LEDS, colorsHSV);
interpolateLinearly(makeHSV(min, sat, val), makeHSV(max, sat, val), LEDS, colorsHSV);
hsv2rgbList(colorsHSV, colorsRGB, LEDS);
@ -123,9 +124,12 @@ int main(){
max = max + steps;
}
if(min == HUE_MAX || max == HUE_MAX) {
falling = !falling;
if(falling && (min >= HUE_MAX || max <= HUE_MIN)) {
falling = false;
} else if(!falling && (min <= HUE_MIN || max >= HUE_MAX)){
falling = true;
}
_delay_ms(2100/(520/steps));
// pulse
//~ if(falling){