#include <Arduino.h>
#include <Adafruit_NeoPixel.h>
#define DIN_PIN 5
#define NUM_PIXELS 64
Adafruit_NeoPixel matrix = Adafruit_NeoPixel(NUM_PIXELS, DIN_PIN, NEO_GRB + NEO_KHZ800);
// ZDE VLOŽ SVOU NAKRESLENOU BITMAPU!
uint32_t ninjaBitmap[64] = {
0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000,
0xff0000, 0x000000, 0x000000, 0x00ff00, 0x00ff00, 0x000000, 0x000000, 0x000000,
0x000000, 0xff0000, 0x00ff00, 0xff0000, 0xff0000, 0xff0000, 0x000000, 0x000000,
0xff0000, 0xff0000, 0xff0000, 0xff0000, 0x000000, 0xff0000, 0xff0000, 0x000000,
0x000000, 0x00ff00, 0x00ff00, 0x00ff00, 0x00ff00, 0x00ff00, 0x00ff00, 0x000000,
0x000000, 0xffa500, 0x00ff00, 0x00ff00, 0x00ff00, 0xffffff, 0xffffff, 0x000000,
0xffa500, 0xffa500, 0xffa500, 0x00ff00, 0x00ff00, 0x00ff00, 0x00ff00, 0x000000,
0xffa500, 0xffa500, 0xffa500, 0x00ff00, 0x00ff00, 0x00ff00, 0x00ff00, 0x000000
};
// Funkce pro vykreslení bitmapy na matici
void drawMatrixImage(uint32_t *img) {
// Projděte všechny pixely matice
for (int i = 0; i < NUM_PIXELS; i++) {
// Nastavit barvu pixelu na odpovídající barvu z bitmapy
matrix.setPixelColor(i, img[i]);
}
// Zobrazit matice
matrix.show();
}
void setup() {
// Inicializace matice
matrix.begin();
// Nastavení jasu (0-255)
matrix.setBrightness(20);
}
void loop() {
// Vykreslení bitmapy na matici
drawMatrixImage(ninjaBitmap);
}