added pin change interupt for chaninging animation state
This commit is contained in:
parent
4f7736b055
commit
f2e601bc66
8 changed files with 131 additions and 56 deletions
|
|
@ -1,8 +1,7 @@
|
|||
// WIP. 4/4/2022: started to implement delay timer asyncronously using existing timer2 interrupt.
|
||||
// WIP. 4/13/2022: added pin change interrupt to handle changing animations
|
||||
|
||||
#include "config.h"
|
||||
#include "cubeplex.h"
|
||||
#include <timer.h>
|
||||
|
||||
int color = red;
|
||||
|
||||
|
|
@ -10,7 +9,7 @@ void setup() {
|
|||
Serial.begin(115200);
|
||||
Serial.println("start program...");
|
||||
initCube();
|
||||
//timerInit();
|
||||
initButton();
|
||||
|
||||
currentState = CHASETHEDOT;
|
||||
lastState = -1;
|
||||
|
|
@ -27,10 +26,14 @@ void loop() {
|
|||
chaseTheDot();
|
||||
break;
|
||||
|
||||
case RANDOMRAINBOW:
|
||||
case RAINBOWRANDOM:
|
||||
rainbow_random();
|
||||
break;
|
||||
|
||||
case RAINBOWCORNER:
|
||||
rainbow_corner();
|
||||
break;
|
||||
|
||||
case PLANARFLOP3D:
|
||||
planarFlop3D();
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue