mirror of
https://github.com/alopexc0de/pixopixel.git
synced 2024-12-25 22:42:40 +00:00
Updated example usage of the functions
The scrolling animations appear to have broken in the second stage, where the image is scrolling out of view.
This commit is contained in:
parent
ae3a642e10
commit
d042468344
@ -246,18 +246,24 @@ void randChangePxl(int src[TOTALPXLS][3], int dst[TOTALPXLS][3], int dlytime, in
|
||||
delay(dlytime);
|
||||
}
|
||||
|
||||
// Loop is at the bottom because Arduino started giving me undefined function errors...
|
||||
void loop() {
|
||||
uint32_t t;
|
||||
while (((t = micros()) - prevTime) < (1000000L / MAX_FPS)); // FPS Limit?
|
||||
prevTime = t;
|
||||
void setup(void) {
|
||||
matrix.begin();
|
||||
matrix.setBrightness(BRIGHTNESS);
|
||||
|
||||
showPxl(twitter, 1000);
|
||||
notifyPopupPxl(glogo, 500);
|
||||
notifyScrollPxl(upvote, 1000, 4);
|
||||
notifyScrollPxl(mario, 1000); // Not specifying the loop will make it only show once
|
||||
// Initialize our pixel structure
|
||||
for (int cnt = 0; cnt < TOTALPXLS; cnt++) {
|
||||
pixols[cnt].active = false;
|
||||
pixols[cnt].id = cnt;
|
||||
}
|
||||
|
||||
// This is supposed to be a random pixel fill transition, but
|
||||
// the rng does not guarentee unique numbers in the range automatically
|
||||
randChangePxl(mario, pridec0de, 1000, 10);
|
||||
// Bootup SH logo
|
||||
showPxl(sh, 1000);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
showPxl(twitter, 1000);
|
||||
randChangePxl(twitter, ig, 1000, 20);
|
||||
notifyScrollPxl(upvote, 1000, 2);
|
||||
notifyPopupPxl(glogo, 1000);
|
||||
notify
|
||||
}
|
Loading…
Reference in New Issue
Block a user