From a9ff478c8ecc653253ac9e25e84f1c8d725c4ecc Mon Sep 17 00:00:00 2001 From: Sean Date: Sat, 16 Apr 2022 22:22:26 -0400 Subject: [PATCH] add shift_squares animation --- charlieCube.ino | 6 +++++- config.h | 1 + cubeplex.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/charlieCube.ino b/charlieCube.ino index 54c6f27..9a20cb7 100644 --- a/charlieCube.ino +++ b/charlieCube.ino @@ -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; diff --git a/config.h b/config.h index 78b59f9..17a6c3a 100644 --- a/config.h +++ b/config.h @@ -5,6 +5,7 @@ typedef enum STATE { CHASETHEDOT, RAINBOWRANDOM, TUNNEL, + SHIFTSQUARES, RAINBOWCORNER, PLANARFLOP3D }; diff --git a/cubeplex.h b/cubeplex.h index 683fe63..e54200f 100644 --- a/cubeplex.h +++ b/cubeplex.h @@ -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)