#include <FastLED.h>
#include "ui.h"
#include "output.h"
#include "effects.h"
#include "menu.h"
#include "macros.h"
#include "pins.h"
void setup() {
Serial.begin(9600);
Serial.println(F("RoelofW"));
setupUI();
setupOutputs();
showMenu(0);
}
void loop() {
static RUNRESULT oldRR = EFFECT_ERROR;
collect();
handleMenuButtons();
if (selectedChoice >= NUMELEMENTS(menuItems)) {
Serial.println("geen geldige menu keuze");
return ;
};
RUNRESULT rr = runEffect(menuItems[selectedChoice].func, potValue);
if (oldRR != rr) {
oldRR = rr;
switch (rr) {
case EFFECT_ERROR:
Serial.println(F(" EFFECT_ERROR"));
break;
/*
case EFFECT_COMPLETE:
Serial.println(F(" EFFECT_COMPLETE"));
break;
case EFFECT_RUNNING:
Serial.println(F(" EFFECT_RUNNING"));
break;
*/
}
}
}
vorige
selecteer
volgende