#include #include "OmobiLedDisplay.h" #define MATRIX_PIN 4 #define TILE_PIXEL_ROWS 8 #define TILE_PIXEL_COLS 8 #define MATRIX_TILES_ROW 1 #define MATRIX_TILES_COL 6 #define MATRIX_PIXEL_WIDTH TILE_PIXEL_COLS*MATRIX_TILES_COL #define MATRIX_PIXEL_HEIGHT TILE_PIXEL_ROWS*MATRIX_TILES_ROW OmobiLedDisplay *display; ///----- Setup of display driver and topology: ------------------------------------------------------------------------- // For detailed information on NeoPixel and NeoTiles etc. - all around display topology setup please see here: // https://github.com/Makuna/NeoPixelBus/wiki/Matrix-Panels-Support NeoPixelBrightnessBusGfx *displayMatrix = new NeoPixelBrightnessBusGfx(MATRIX_PIXEL_WIDTH, MATRIX_PIXEL_HEIGHT, MATRIX_PIN); NeoTiles tiles(TILE_PIXEL_COLS, TILE_PIXEL_ROWS, MATRIX_TILES_COL,MATRIX_TILES_ROW); // use a remap function to remap based on the topology, tile or mosaik // this function is passed as remap function to the matrix uint16_t remap(uint16_t x, uint16_t y) { return tiles.Map(x, y); } ///-------------------------------------------------------------------------------------------------------------------- void setup() { Serial.begin(115200); Serial.printf("Los\n"); // create our display displayMatrix->setRemapFunction(&remap); display = new OmobiLedDisplay("OmobiLedDisplay1", displayMatrix); } void loop() { // nothing to do in loop //Serial.printf("LDR value is: %d\n", analogRead(LDR_PIN)); display->loop(); delay(1); }