22 lines
443 B
C
22 lines
443 B
C
#include <stdlib.h>
|
|
#include <base.h>
|
|
#include <rng.h>
|
|
|
|
typedef struct RGB_s {
|
|
uint8_t brightness;
|
|
uint8_t r;
|
|
uint8_t g;
|
|
uint8_t b;
|
|
} rgb_t;
|
|
|
|
|
|
int main (void) {
|
|
rng_t rng = rng_new(0);
|
|
animation_t animation = animation_new();
|
|
|
|
for (int i = 0; i < 120; i++) {
|
|
animation_step(&animation, &rng);
|
|
printf("[%d] %d %d %d\n", animation.frame, animation.lamp.r, animation.lamp.g, animation.lamp.b);
|
|
}
|
|
}
|