diff --git a/Makefile b/Makefile index 2f914a0..e3ade60 100644 --- a/Makefile +++ b/Makefile @@ -49,5 +49,5 @@ bin: $(PRG).bin $(OBJCOPY) -j .text -j .data -O binary $< $@ prg: $(PRG).bin - python2 ../megaHidProg/megaHidProg.py -C -c 1000 -t 4 -b $(PRG).bin + python2 megaHidProg.py -C -c 1000 -t 4 -b $(PRG).bin diff --git a/main.c b/main.c index 233b9d9..38445a1 100644 --- a/main.c +++ b/main.c @@ -28,12 +28,16 @@ int main(void) ledcontroller_init(); sei(); - //lcd_init(); + lcd_init(); DDRC |= (1< 2) { color_start = 0; } + color = color_start; + for (int led=0; led<12; led++) { + color++; + switch (color) { + case 1: + led_set(led, 0x00, brightness, 0x00); + break; + case 2: + led_set(led, 0x00, 0x00, brightness); + break; + default: + color = 0; + led_set(led, brightness, 0x00, 0x00); + break; + } + led_flush(); + timer_wait(5); + } + brightness = brightness + brightness/20; + if (brightness > 0x4fff) { + brightness = 0xff; + } + + } +} + void rgbyteclock_secwatch(void) { uint8_t hours, mins; @@ -143,6 +178,7 @@ void rgbyteclock_secwatch_glide(void) void rgbyteclock(void) { //rgbyteclock_rounds(); + rgbyteclock_rounds_colored(); //rgbyteclock_secwatch(); - rgbyteclock_secwatch_glide(); + //rgbyteclock_secwatch_glide(); }