Did some clean up and separate the business logic. The REDLED.ino contains the BCM code. animation.* and rgb.* define animation loop and the rgb structure.
Documentation