can draw text

This commit is contained in:
2024-11-30 15:46:07 +01:00
parent c45a673fc0
commit 5a9bd1d57b
4 changed files with 375 additions and 39 deletions

22
main/LEDMatrix.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef LEDMATRIX_H
#define LEDMATRIX_H
#include <FastLED.h>
#include <stdint.h>
class LEDMatrix {
public:
LEDMatrix(uint8_t width, uint8_t height, uint16_t numLeds, uint16_t lastVisibleLed, CRGB* leds);
uint16_t XY(uint8_t x, uint8_t y);
void drawPixel(uint8_t x, uint8_t y, CRGB color);
private:
const uint8_t kMatrixWidth;
const uint8_t kMatrixHeight;
const uint16_t NUM_LEDS;
const uint16_t LAST_VISIBLE_LED;
const int* XYTable;
CRGB* leds; // Add this line
};
#endif // LEDMATRIX_H