initial commit
This commit is contained in:
commit
51e3178414
7 changed files with 1386 additions and 0 deletions
41
charlieCube.ino
Normal file
41
charlieCube.ino
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
// WIP. 3/28/2022: added test state machine. Need to re-write moving to next state
|
||||
|
||||
#include "config.h"
|
||||
#include "cubeplex.h"
|
||||
#include <timer.h>
|
||||
|
||||
Timer animationDelay;
|
||||
bool animationDelayTiming = false;
|
||||
|
||||
int color = red;
|
||||
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Serial.println("start program...");
|
||||
initCube();
|
||||
timerInit();
|
||||
|
||||
currentState = CHASETHEDOT;
|
||||
lastState = -1;
|
||||
|
||||
// how many secconds until the animation is told to progress
|
||||
animationMax = 10;
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
switch (currentState) {
|
||||
|
||||
case CHASETHEDOT:
|
||||
chaseTheDot();
|
||||
//currentState = PLANARFLOP3D;
|
||||
break;
|
||||
|
||||
case PLANARFLOP3D:
|
||||
planarFlop3D();
|
||||
//currentState = CHASETHEDOT;
|
||||
break;
|
||||
}
|
||||
animationDelay.update();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue