#ifndef LEDMATRIX #define LEDMATRIX using namespace std; #include #include #include // #include // #include #include class LedMatrix : public CFastLED { private: uint8_t height; uint8_t width; static const uint8_t MATRIX_PIN = 28; uint16_t num_leds; // default 64x64 = 4096 LEDs vector leds; // Automatic memory management template uint8_t charWidth(const uint16_t *charMatrix); public: LedMatrix(uint8_t h = 64, uint8_t w = 64); ~LedMatrix(); void drawPixel(int x, int y, CRGB color); uint8_t drawChar(int x, int y, char c, CRGB color); // Draw text string void drawText(int x, int y, const char *text, CRGB color); vector number_to_bitarray_msb(uint16_t number, int bits = 8, boolean four_bits = false); }; #endif