Add existing code: Power consumption test cases and Semaphore power scheduler skeleton

This commit is contained in:
2024-11-24 23:09:46 +01:00
parent 87b9fbe66f
commit e4dffe50c7
13 changed files with 522 additions and 0 deletions

View File

@ -0,0 +1,44 @@
#include "Dezibot.h"
Dezibot dezibot = Dezibot();
void setup() {
dezibot.multiColorLight.begin();
}
void loop() {
/* Loop through the LEDs at full brightness for measurements, with 20 seconds to measure for each state */
for (int state = 0; state < 6; state++) {
switch (state) {
case 0:
dezibot.multiColorLight.turnOffLed(ALL);
break;
case 1:
dezibot.multiColorLight.turnOffLed(ALL);
delay(10);
dezibot.multiColorLight.setLed(TOP_LEFT,WHITE);
break;
case 2:
dezibot.multiColorLight.turnOffLed(ALL);
delay(10);
dezibot.multiColorLight.setLed(TOP_RIGHT,WHITE);
break;
case 3:
dezibot.multiColorLight.turnOffLed(ALL);
delay(10);
dezibot.multiColorLight.setLed(BOTTOM,WHITE);
break;
case 4:
dezibot.multiColorLight.turnOffLed(ALL);
delay(10);
dezibot.multiColorLight.setLed(TOP,WHITE);
break;
case 5:
dezibot.multiColorLight.turnOffLed(ALL);
delay(10);
dezibot.multiColorLight.setLed(ALL,WHITE);
break;
}
sleep(20);
}
}