Last active
September 15, 2025 17:15
-
-
Save agrif/6f96c4f90369525aa2e416131b92a502 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment