Hello guys, I have some trouble with Neopixel Matrix Displey. I want to draw some simple images with bitmap. I tried to draw smile, but I dont know, how can I rotate image vertically as you can see on the picture .
Can you give me some hit please ?
Here is code:
#include "FastLED.h"
#define NUM_LEDS 256
#define DATA_PIN 6
CRGB leds[NUM_LEDS];
long smile[] =
{
0x800000, 0x800000, 0x800000, 0x800000, 0x800000, 0x800000, 0x800000, 0x800000,
0x800000, 0x800000, 0x800000, 0x800000, 0x800000, 0x800000, 0x800000, 0x800000,
0x800000, 0xffffff, 0xffffff, 0x800000, 0x800000, 0xffffff, 0xffffff, 0x800000,
0x800000, 0xffffff, 0xffffff, 0x800000, 0x800000, 0xffffff, 0xffffff, 0x800000,
0x800000, 0x800000, 0x800000, 0x800000, 0x800000, 0x800000, 0x800000, 0x800000,
0xffffff, 0x800000, 0x800000, 0x800000, 0x800000, 0x800000, 0x800000, 0xffffff,
0x800000, 0xffffff, 0x800000, 0x800000, 0x800000, 0x800000, 0xffffff, 0x800000,
0x800000, 0x800000, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0x800000, 0x800000
};
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
}
void loop() {
for (int i = 0; i < 64; i++) {
leds[i] = smile[i];
}
FastLED.setBrightness(40);
FastLED.show();
delay(800);
}