22 #ifndef Adafruit_LEDBackpack_h 23 #define Adafruit_LEDBackpack_h 31 #include <Adafruit_I2CDevice.h> 33 #include "Adafruit_GFX.h" 42 #define HT16K33_BLINK_CMD 0x80 43 #define HT16K33_BLINK_DISPLAYON 0x01 44 #define HT16K33_BLINK_OFF 0 45 #define HT16K33_BLINK_2HZ 1 46 #define HT16K33_BLINK_1HZ 2 47 #define HT16K33_BLINK_HALFHZ 3 49 #define HT16K33_CMD_BRIGHTNESS 0xE0 51 #define SEVENSEG_DIGITS 5 72 #define ALPHANUM_SEG_A 0b0000000000000001 73 #define ALPHANUM_SEG_B 0b0000000000000010 74 #define ALPHANUM_SEG_C 0b0000000000000100 75 #define ALPHANUM_SEG_D 0b0000000000001000 76 #define ALPHANUM_SEG_E 0b0000000000010000 77 #define ALPHANUM_SEG_F 0b0000000000100000 78 #define ALPHANUM_SEG_G1 0b0000000001000000 79 #define ALPHANUM_SEG_G2 0b0000000010000000 80 #define ALPHANUM_SEG_H 0b0000000100000000 81 #define ALPHANUM_SEG_J 0b0000001000000000 82 #define ALPHANUM_SEG_K 0b0000010000000000 83 #define ALPHANUM_SEG_L 0b0000100000000000 84 #define ALPHANUM_SEG_M 0b0001000000000000 85 #define ALPHANUM_SEG_N 0b0010000000000000 86 #define ALPHANUM_SEG_DP 0b0100000000000000 106 bool begin(uint8_t _addr = 0x70, TwoWire *theWire = &Wire);
161 void setBar(uint8_t bar, uint8_t color);
182 void drawPixel(int16_t x, int16_t y, uint16_t color);
189 public Adafruit_GFX {
204 void drawPixel(int16_t x, int16_t y, uint16_t color);
225 void drawPixel(int16_t x, int16_t y, uint16_t color);
232 public Adafruit_GFX {
247 void drawPixel(int16_t x, int16_t y, uint16_t color);
267 size_t write(
char c);
275 size_t write(
const char *buffer,
size_t size);
288 void print(
unsigned char b,
int base =
RAW_BITS);
295 void print(
int n,
int base = DEC);
302 void print(
unsigned int n,
int base = DEC);
309 void print(
long n,
int base = DEC);
316 void print(
unsigned long n,
int base = DEC);
323 void print(
double n,
int digits = 2);
329 void print(
const String &c);
335 void print(
const char c[]);
341 void println(
char c);
349 void println(
unsigned char b,
int base =
RAW_BITS);
356 void println(
int n,
int base = DEC);
363 void println(
unsigned int n,
int base = DEC);
370 void println(
long n,
int base = DEC);
377 void println(
unsigned long n,
int base = DEC);
384 void println(
double n,
int digits = 2);
390 void println(
const String &c);
396 void println(
const char c[]);
408 void writeDigitRaw(uint8_t x, uint8_t bitmask);
416 void writeDigitNum(uint8_t x, uint8_t num,
bool dot =
false);
424 void writeDigitAscii(uint8_t x, uint8_t c,
bool dot =
false);
430 void drawColon(
bool state);
438 void printNumber(
long n, uint8_t base = 2);
447 void printFloat(
double n, uint8_t fracDigits = 2, uint8_t base = DEC);
452 void printError(
void);
457 void writeColon(
void);
479 void writeDigitRaw(uint8_t n, uint16_t bitmask);
487 void writeDigitAscii(uint8_t n, uint8_t ascii,
bool dot =
false);
490 #endif // Adafruit_LEDBackpack_h Class for 8x16 pixel single-color mini matrices.
Definition: Adafruit_LEDBackpack.h:188
uint16_t displaybuffer[8]
Raw display data.
Definition: Adafruit_LEDBackpack.h:140
Adafruit_I2CDevice * i2c_dev
Pointer to I2C bus interface.
Definition: Adafruit_LEDBackpack.h:143
Class for 7-segment numeric displays.
Definition: Adafruit_LEDBackpack.h:255
Class for 24-element bargraph displays.
Definition: Adafruit_LEDBackpack.h:149
Class encapsulating the raw HT16K33 controller device.
Definition: Adafruit_LEDBackpack.h:91
void setBrightness(uint8_t b)
Set display brightness.
Definition: Adafruit_LEDBackpack.cpp:280
void clear(void)
Clear display.
Definition: Adafruit_LEDBackpack.cpp:334
void setDisplayState(bool state)
Turn display on or off.
Definition: Adafruit_LEDBackpack.cpp:271
Class for bi-color matrices.
Definition: Adafruit_LEDBackpack.h:231
#define RAW_BITS
Issue 7-segment data as raw bits.
Definition: Adafruit_LEDBackpack.h:250
void blinkRate(uint8_t b)
Set display blink rate.
Definition: Adafruit_LEDBackpack.cpp:287
Class for four-digit alphanumeric displays.
Definition: Adafruit_LEDBackpack.h:466
Adafruit_LEDBackpack(void)
Constructor for HT16K33 devices.
Definition: Adafruit_LEDBackpack.cpp:294
Class for 8x8 pixel single-color matrices.
Definition: Adafruit_LEDBackpack.h:210
void writeDisplay(void)
Issue buffered data in RAM to display.
Definition: Adafruit_LEDBackpack.cpp:321
bool begin(uint8_t _addr=0x70, TwoWire *theWire=&Wire)
Start I2C and initialize display state (blink off, full brightness).
Definition: Adafruit_LEDBackpack.cpp:296
Class for 8x16 pixel single-color matrices.
Definition: Adafruit_LEDBackpack.h:167