rgbyteclock-code/rgbyteclock.c

48 lines
761 B
C
Raw Permalink Normal View History

2014-03-01 03:50:09 +01:00
#include "rgbyteclock.h"
2014-03-15 15:34:37 +01:00
void rgbyteclock(void)
{
2014-04-17 04:17:26 +02:00
uint8_t gain = 0;
2014-08-07 17:50:11 +02:00
rgbyteclock_rounds();
2014-08-07 17:50:11 +02:00
2014-04-17 04:52:46 +02:00
//rgbyteclock_rounds_white();
2014-04-17 04:52:46 +02:00
for (int led=0;led<12;led++) {
led_set(led, 200*(12-led), 200*(led), 0);
}
led_flush();
2014-03-15 15:34:37 +01:00
while (1) {
2014-04-17 04:52:46 +02:00
PORTC |= (1<<PC5); // Test LED
for (int led=0;led<12;led++) {
led_set(led, 100*(12-led), 100*(led), 100);
}
led_flush();
led_set_current_mode(0);
for (gain=0;gain<=0x3f;gain+=8) {
led_set_gain(gain);
timer_wait(250);
}
PORTC &= ~(1<<PC5); // Test LED
for (int led=0;led<12;led++) {
led_set(led, 100*(12-led), 100*(led), 100);
}
led_flush();
led_set_current_mode(1);
for (gain=0;gain<=0x3f;gain+=8) {
led_set_gain(gain);
timer_wait(250);
}
2014-03-15 15:34:37 +01:00
}
}
2014-03-01 03:50:09 +01:00