Using a Arduino Mega and a 32x32 LED display I can run the Adafruit library.
My attention then focused on one exemple from the library. "colorweel_progmem_32x32"
it is composed of 2 parts the main code :
#include <RGBmatrixPanel.h>
#include "image.h" // Precomputed colorwheel image is here
#define CLK 8 // USE THIS ON ADAFRUIT METRO M0, etc.
//#define CLK A4 // USE THIS ON METRO M4 (not M0)
//#define CLK 11 // USE THIS ON ARDUINO MEGA
#define OE 9
#define LAT 10
#define A A0
#define B A1
#define C A2
#define D A3
RGBmatrixPanel matrix(A, B, C, D, CLK, LAT, OE, false);
void setup() {
int i, len;
uint8_t *ptr = matrix.backBuffer(); // Get address of matrix data
// Copy image from PROGMEM to matrix buffer:
memcpy_P(ptr, img, sizeof(img));
// Start up matrix AFTER data is copied. The RGBmatrixPanel
// interrupt code ties up about 40% of the CPU time, so starting
// it now allows the prior drawing code to run even faster!
matrix.begin();
}
void loop() {
// Do nothing -- image doesn't change
}
And then the image.h that the code is referring to :
I played a little with the code to modify the original image but now I wonder how to import my own image into it.
I Think I am looking for a JPG to progmem convertor but I'm really not sure and I tried already different convertor but It never really worked.
Hello everyone,
Using a Arduino Mega and a 32x32 LED display I can run the Adafruit library. My attention then focused on one exemple from the library. "colorweel_progmem_32x32"
it is composed of 2 parts the main code :
And then the image.h that the code is referring to :
I played a little with the code to modify the original image but now I wonder how to import my own image into it. I Think I am looking for a JPG to progmem convertor but I'm really not sure and I tried already different convertor but It never really worked.
Do some of you would have advice for that ?
Thank You,
Lucien.