akowalew / ws2812

Test project for WS2812 LEDs
3 stars 0 forks source link

Platform-independent animations #29

Open akowalew opened 3 years ago

akowalew commented 3 years ago

Extract animation related stuff into completely separate module, that is platform-independent. This module should know, that order of colors is GRBGRBGRB and so on, but is should not know anything about transmission or WS2812. This way we during porting application to other processors we don't need to rewrite animation stuff again. Even if we will have one time other LEDs, not WS2812, but having GRB schema, we can use those animations also. Even if schema will be different, e.g. BGR, we can write simple loop to reorganize colors, or even add some configuration macros to this module, which will change target pixel order