Skip to content

Instantly share code, notes, and snippets.

@connornishijima
Last active March 11, 2022 22:24
Show Gist options
  • Save connornishijima/34da560f76fe3381c725c919caee0591 to your computer and use it in GitHub Desktop.
Save connornishijima/34da560f76fe3381c725c919caee0591 to your computer and use it in GitHub Desktop.
Quick demo of Pixie Chroma code showing the current frame rate with a rainbow pattern!
#include "Pixie_Chroma.h" // ... Include library (1.0.0 used here)
PixieChroma pix; // ............ Get class object
#define PIXIES_PER_PIN 3 // ... Needed for quad mode
#define PIXIES_X 6 // ... How many Pixie PCBs "wide" is our display?
#define PIXIES_Y 2 // ... How many tall?
void setup() {
pix.begin_quad(PIXIES_PER_PIN, PIXIES_X, PIXIES_Y); // Initialize Pixies
pix.set_palette(RAINBOW);
pix.set_animation(ANIMATION_PENDULUM);
}
void loop() {
pix.clear();
pix.print(" FRAME RATE \n ");
pix.print(pix.frame_rate);
pix.print(" FPS ");
pix.show();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment