//http://www.io-expert.com/ledmatrixeditor/
#include <Adafruit_NeoPixel.h>
#define PIN 6 // Pino de controle dos LEDs
#define NUMPIXELS 16 // Número de LEDs na fita (certifique-se de que há pelo menos 16 LEDs para este exemplo)
Adafruit_NeoPixel pixels(NUMPIXELS, PIN);
struct CRGB {
uint8_t r;
uint8_t g;
uint8_t b;
CRGB(uint8_t red, uint8_t green, uint8_t blue) : r(red), g(green), b(blue) {}
};
CRGB image[16] = {
CRGB(0x00,0xFF,0x00), CRGB(0x00,0xFF,0xFF), CRGB(0x00,0xFF,0x00), CRGB(0xFF,0x00,0xFF),
CRGB(0xFF,0x00,0xFF), CRGB(0x00,0xFF,0x00), CRGB(0x00,0xFF,0x00), CRGB(0x00,0xFF,0x00),
CRGB(0xFF,0x00,0xFF), CRGB(0x00,0xFF,0x00), CRGB(0x00,0xFF,0xFF), CRGB(0x00,0xFF,0xFF),
CRGB(0xFF,0x00,0xFF), CRGB(0x00,0xFF,0x00), CRGB(0xFF,0x00,0xFF), CRGB(0xFF,0x00,0xFF),
};
void setPixelColorCRGB(int pixel, CRGB color) {
pixels.setPixelColor(pixel, pixels.Color(color.r, color.g, color.b));
}
void setup() {
pixels.begin();
pixels.show();
}
void loop() {
for (int i = 0; i < NUMPIXELS; i++) {
setPixelColorCRGB(i, image[i]);
}
pixels.show();
delay(1000);
}
FPS: 0
Power: 0.00W
Power: 0.00W