void main(void) { //uart->divisor = 234; *leds = 0x0; #define SLOTS 6 uint8_t times[SLOTS] = {0}; uint8_t subtime = 0; while (true) { *leds = 0; for (uint8_t i = 0; i < SLOTS; i++) { *leds <<= 1; if (subtime < sine_table[times[i]]) { *leds |= 1; } } subtime++; if (subtime == 0) { for (uint8_t i = 0; i < SLOTS; i++) { times[i] += i * i + 1; } } delay(100); } }