Status bar¤
Status bar is the top row of 5 LEDs marked as A-E.
void setState(int state)
: Set progressint state()
: Return current statevoid setColor(Rgb color)
: Set the color of status barRgb color()
: Return current color of status barvoid show(int intensity = 255)
: Show current frame/statevoid clear()
: Clear the displayRgb& at(int x)
: Return pixel at given position
Example¤
#include "Logic.hpp"
#include <iostream>
void logicMain() {
while (true) {
statusBar.setColor(Rgb(255, 0, 0));
statusBar.setState(4);
statusBar.show(30);
delay(3000);
statusBar.clear();
statusBar.setColor(Rgb(0, 255, 0));
statusBar.setState(2);
statusBar.show(30);
delay(3000);
statusBar.clear();
statusBar.at(4) = Rgb(0, 0, 255);
statusBar.show(30);
delay(3000);
statusBar.clear();
statusBar.at(0) = Rgb(255, 0, 0);
statusBar.at(1) = Rgb(0, 255, 0);
statusBar.at(2) = Rgb(0, 0, 255);
statusBar.show(30);
delay(3000);
statusBar.clear();
}
}