Hi folks,
not new to arduino but certainly no expert...I've searched and searched but can not find an answer to my problem, hopefully some nice person around here can help.
So I've got a 16x8 matrix made with WS2812B's and I've been displaying 16x8 bitmaps on it no problem...if I create the array how I want to see it on the matrix. ie
const long pac1[] PROGMEM =
{
0xffff00, 0xffff00, 0xffff00, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000,
0xffff00, 0xffff00, 0xffff00, 0xffff00, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000,
0xffff00, 0xffff00, 0xffff00, 0xffff00, 0xffff00, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xffffff, 0xffffff,
0xffff00, 0xffff00, 0xffff00, 0xffff00, 0xffff00, 0x000000, 0x000000, 0x000000, 0xffffff, 0xffffff, 0x000000, 0x000000, 0x000000, 0xffffff, 0xffffff, 0xffffff,
0xffff00, 0xffff00, 0xffff00, 0xffff00, 0xffff00, 0x000000, 0x000000, 0x000000, 0xffffff, 0xffffff, 0x000000, 0x000000, 0x000000, 0xffffff, 0xffffff, 0xffffff,
0xffff00, 0xffff00, 0xffff00, 0xffff00, 0xffff00, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0xffffff, 0xffffff,
0xffff00, 0xffff00, 0xffff00, 0xffff00, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000,
0xffff00, 0xffff00, 0xffff00, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000, 0x000000,
};
and calling it with;
FastLED.clear();
for(int i = 0; i < NUM_LEDS; i++) {
leds[i] = pgm_read_dword(&(pac1[i]));
}
FastLED.show();
delay(anim);
and that works as it should.
However, what I now want to do is have effectively a static bitmap shifted across the matrix from off screen left, to off screen right by one pixel at a time. I could do it by creating a new bitmap array for every "frame" but that would take too much memory and time...I know there will be a way to only need the one bitmap and just have it shift pixel by pixel, but I can not find a way to use the adafruit GFX library or FastLED to scroll the kind of bitmap array I want, only this kind...ie;
{ // 2: smiley
B00111100,
B01000010,
B10100101,
B10000001,
B10100101,
B10011001,
B01000010,
B00111100 },
using..
void drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h, uint16_t color);
where I could incriment int16_x by 1 each pass.
So, could someone please point me in the direction of the correct way to display a "full" rgb (I think it's 3 bytes, 1 per R,G,B??? so, 0xff96b0) and have it shifted right one pixel at a time.
Massive thanks in advance, this is a case of I cant see the wood for the trees
Gibz