Rings Of Success - Object show
// This #include statement was automatically added by the Particle IDE.
#include <neopixel.h>
// This #include statement was automatically added by the Particle IDE.
#include <neomatrix.h>
// This #include statement was automatically added by the Particle IDE.
#include <Adafruit_GFX.h>
int MATRIX_PIN = D6;
#define NEO_GRB ((1 << 6) | (1 << 4) | (0 << 2) | (2)) // 0x52
#define NEO_KHZ800 0x0000 // 800 KHz datastream
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(32, 8, MATRIX_PIN,
NEO_MATRIX_BOTTOM + NEO_MATRIX_RIGHT +
NEO_MATRIX_COLUMNS + NEO_MATRIX_ZIGZAG,
NEO_GRB + NEO_KHZ800);
const uint16_t colors[] = {
matrix.Color(255, 0, 0), matrix.Color(0, 255, 0), matrix.Color(0, 0, 255) };
int x = matrix.width();
int pass = 0;
void setup() {
matrix.begin();
matrix.setTextWrap(false);
matrix.setBrightness(40);
matrix.setTextColor(colors[0]);
for (int i = 0; i < 256;i++){
matrix.fillScreen(0);
matrix.setCursor(x, 0);
matrix.setTextColor(colors[1]);
matrix.print(F("RINGS OF SUCCESS"));
if(--x < -96) {
x = matrix.width();
}
matrix.show();
delay(50);
}
}
void loop() {
matrix.fillScreen(0);
matrix.setCursor(x, 0);
/* matrix.print(F("Hi Brian"));
if(--x < -36) {
x = matrix.width();
if(++pass >= 3) pass = 0;
matrix.setTextColor(colors[pass]);
}
matrix.show(); */
if(++pass >= 3) pass = 0;
for(int i = 8; i > -1; i--) {
matrix.drawFastHLine(0,i,32,colors[pass]);
matrix.show();
delay(1000);
}
matrix.fillScreen(0);
matrix.show();
delay(500);
}
Click to Expand
Content Rating
Is this a good/useful/informative piece of content to include in the project? Have your say!
You must login before you can post a comment. .