#include #include #include #include "light_ws2812.h" //für progmem #include //const uint8_t NUM_LEDS = 24; // Anzahl Leds #define NUM_LEDS 1 struct cRGB leds[NUM_LEDS]; const uint16_t pwmtable_10[64] PROGMEM = { 0, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17, 19, 21, 23, 26, 29, 32, 36, 40, 44, 49, 55, 61, 68, 76, 85, 94, 105, 117, 131, 146, 162, 181, 202, 225, 250, 279, 311, 346, 386, 430, 479, 534, 595, 663, 739, 824, 918, 1023 }; int main(void) { while(1) { for(uint8_t step = 0; step < 64; step++) { // Led einschalten leds[0].r = 0; leds[0].g = 0; leds[0].b = pwmtable_10[step]; ws2812_setleds(leds, NUM_LEDS); _delay_ms(100); } } }