mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-07-04 17:51:41 +02:00
Add existing code: Power consumption test cases and Semaphore power scheduler skeleton
This commit is contained in:
26
example/advanced/Power_Measurements/Display/Display.ino
Normal file
26
example/advanced/Power_Measurements/Display/Display.ino
Normal file
@ -0,0 +1,26 @@
|
||||
#include "Dezibot.h"
|
||||
|
||||
Dezibot dezibot = Dezibot();
|
||||
|
||||
// How many times to run a command on the display consecutively;
|
||||
const uint16_t iterations = 5000;
|
||||
|
||||
void setup() {
|
||||
dezibot.begin();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
//Typical output
|
||||
dezibot.display.println("Typical output");
|
||||
for(uint16_t iter=0; iter<iterations; iter++) {
|
||||
dezibot.display.println(iter);
|
||||
}
|
||||
delay(10);
|
||||
//Lots of pixels turned on
|
||||
dezibot.display.invertColor();
|
||||
dezibot.display.println("Inverted output");
|
||||
for(uint16_t iter=0; iter<iterations; iter++) {
|
||||
dezibot.display.println(iter);
|
||||
}
|
||||
delay(10);
|
||||
}
|
Reference in New Issue
Block a user