2020-10-13 17:01:29 +02:00
|
|
|
#include <Arduino.h>
|
|
|
|
#include "OmobiLedDisplay.h"
|
|
|
|
|
2020-10-17 23:06:55 +02:00
|
|
|
#define MATRIX_PIN 4
|
|
|
|
#define TILE_PIXEL_ROWS 8
|
|
|
|
#define TILE_PIXEL_COLS 8
|
|
|
|
#define MATRIX_TILES_ROW 1
|
|
|
|
#define MATRIX_TILES_COL 2
|
|
|
|
#define MATRIX_PIXEL_WIDTH TILE_PIXEL_COLS*MATRIX_TILES_COL
|
|
|
|
#define MATRIX_PIXEL_HEIGHT TILE_PIXEL_ROWS*MATRIX_TILES_ROW
|
2020-10-13 17:01:29 +02:00
|
|
|
|
2020-10-14 23:54:54 +02:00
|
|
|
OmobiLedDisplay *display;
|
2020-10-13 17:01:29 +02:00
|
|
|
|
2020-10-17 23:06:55 +02:00
|
|
|
NeoPixelBrightnessBusGfx<NeoGrbFeature, Neo800KbpsMethod> *displayMatrix = new NeoPixelBrightnessBusGfx<NeoGrbFeature, Neo800KbpsMethod>(MATRIX_PIXEL_WIDTH, MATRIX_PIXEL_HEIGHT, MATRIX_PIN);
|
|
|
|
NeoTiles <RowMajorLayout, RowMajorLayout> 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);
|
|
|
|
}
|
|
|
|
|
2020-10-13 17:01:29 +02:00
|
|
|
void setup()
|
|
|
|
{
|
|
|
|
Serial.begin(115200);
|
|
|
|
Serial.printf("Los\n");
|
2020-10-14 23:54:54 +02:00
|
|
|
// create our display
|
2020-10-17 23:06:55 +02:00
|
|
|
displayMatrix->setRemapFunction(&remap);
|
2020-10-14 23:54:54 +02:00
|
|
|
display = new OmobiLedDisplay("OmobiLedDisplay1", displayMatrix);
|
2020-10-17 23:06:55 +02:00
|
|
|
|
2020-10-13 17:01:29 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void loop()
|
|
|
|
{
|
2020-10-14 23:54:54 +02:00
|
|
|
// nothing to do in loop
|
2020-10-15 16:58:06 +02:00
|
|
|
display->loop();
|
|
|
|
delay(1);
|
2020-10-17 23:06:55 +02:00
|
|
|
}
|