Seven Segments Displays Agnostic Library for ESP32 (Arduino) v3.0.0 A library that provides a class that models a Seven Segment Display and provides an unified API through it's members independently of the display technology.

Loading...
Searching...
No Matches
MAX7219Segment.h
1#ifndef MAX7219Segment_h
2#define MAX7219Segment_h
3
4// #include <avr/pgmspace.h>
5
6#if (ARDUINO >= 100)
7#include <Arduino.h>
8#else
9#include <WProgram.h>
10#endif
11
12 const static byte charTable [] PROGMEM = {
13 B01111110,B00110000,B01101101,B01111001,B00110011,B01011011,B01011111,B01110000,B01111111,B01111011,B00000001
14};
15
16 class MAX7219Segment
17{
18 private:
19 int DIN_PIN;
20 int CS_PIN;
21 int CLK_PIN;
22 int _digitLimit;
23 byte *value;
24 void table(byte address, int val);
25 public:
26 MAX7219Segment(int dinPin, int csPin, int clkPin);
27 void setBright(int brightness);
28 void setDigitLimit(int limit);
29 void printDigit(long number, byte startDigit = 0);
30 void printDot(byte address);
31 void write(byte address, byte data);
32 void clear();
33 void on();
34 void off();
35};
36
37#endif //DigitLedDisplay.h