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;
// how many secconds until the animation is told to progress
animationMax = 10;
animationMax = 90;
}
void loop() {
@ -34,6 +34,10 @@ void loop() {
tunnel();
break;
case SHIFTSQUARES:
shift_squares();
break;
case RAINBOWCORNER:
rainbow_corner();
break;

View file

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

View file

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