add shift_squares animation

This commit is contained in:
Sean 2022-04-16 22:22:26 -04:00
parent 0a36308aa9
commit a9ff478c8e
3 changed files with 7 additions and 2 deletions

View file

@ -15,7 +15,7 @@ void setup() {
lastState = -1; lastState = -1;
// how many secconds until the animation is told to progress // how many secconds until the animation is told to progress
animationMax = 10; animationMax = 90;
} }
void loop() { void loop() {
@ -34,6 +34,10 @@ void loop() {
tunnel(); tunnel();
break; break;
case SHIFTSQUARES:
shift_squares();
break;
case RAINBOWCORNER: case RAINBOWCORNER:
rainbow_corner(); rainbow_corner();
break; break;

View file

@ -5,6 +5,7 @@ typedef enum STATE {
CHASETHEDOT, CHASETHEDOT,
RAINBOWRANDOM, RAINBOWRANDOM,
TUNNEL, TUNNEL,
SHIFTSQUARES,
RAINBOWCORNER, RAINBOWCORNER,
PLANARFLOP3D PLANARFLOP3D
}; };

View file

@ -582,7 +582,7 @@ int currentTimer = 0;
int maxTimer = 6250; // 100ms delay / 16uS interrupt time int maxTimer = 6250; // 100ms delay / 16uS interrupt time
int nextState(int state) { int nextState(int state) {
return (state + 1) % 3; return (state + 1) % 4;
} }
// the interrupt function to display the leds (T2 = 8 bit timer) // the interrupt function to display the leds (T2 = 8 bit timer)