From 0a36308aa98d44cab8b1c863f403e67db1177eb5 Mon Sep 17 00:00:00 2001 From: Sean Date: Thu, 14 Apr 2022 20:26:43 -0400 Subject: [PATCH] added tunnel animation --- charlieCube.ino | 4 ++++ config.h | 1 + cubeplex.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/charlieCube.ino b/charlieCube.ino index 4011d86..54c6f27 100644 --- a/charlieCube.ino +++ b/charlieCube.ino @@ -30,6 +30,10 @@ void loop() { rainbow_random(); break; + case TUNNEL: + tunnel(); + break; + case RAINBOWCORNER: rainbow_corner(); break; diff --git a/config.h b/config.h index 1e17c12..78b59f9 100644 --- a/config.h +++ b/config.h @@ -4,6 +4,7 @@ typedef enum STATE { CHASETHEDOT, RAINBOWRANDOM, + TUNNEL, RAINBOWCORNER, PLANARFLOP3D }; diff --git a/cubeplex.h b/cubeplex.h index d48218b..683fe63 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) % 2; + return (state + 1) % 3; } // the interrupt function to display the leds (T2 = 8 bit timer)