#include <Adafruit_Microbit.h>
|
boolean | begin (void) |
| Initialized the 5x5 matrix and scanning IRQ. More...
|
|
void | drawPixel (int16_t x, int16_t y, uint16_t color) |
| Draw a single pixel/LED on the 5x5 matrix. More...
|
|
void | fillScreen (uint16_t color) |
| Fill the 5x5 matrix with an LED 'color'. More...
|
|
void | clear (void) |
| Clear the 5x5 matrix.
|
|
void | rowHandler (void) |
| Matrix object function called by IRQ handler for each row This is not optimized at all but its not so bad either!
|
|
void | show (const uint8_t bitmap[]) |
| Display a 5-byte bitmap on the 5x5 LED matrix. More...
|
|
void | scrollText (char *string, uint8_t stepdelay=150) |
| Scroll display a string on the 5x5 LED matrix. More...
|
|
void | print (char *string) |
| Display a string on the 5x5 LED matrix. More...
|
|
void | print (int32_t i) |
| Display a signed number on the 5x5 LED matrix. More...
|
|
void | print (int i) |
| Display a signed number on the 5x5 LED matrix. More...
|
|
void | print (double f, int precision=3) |
| Display a floating point number on the 5x5 LED matrix. More...
|
|
Class to create Adafruit_GFX interface for 5x5 matrix of micro:bit
◆ begin()
boolean Adafruit_Microbit_Matrix::begin |
( |
void |
| ) |
|
Initialized the 5x5 matrix and scanning IRQ.
- Returns
- True
◆ drawPixel()
void Adafruit_Microbit_Matrix::drawPixel |
( |
int16_t |
x, |
|
|
int16_t |
y, |
|
|
uint16_t |
color |
|
) |
| |
Draw a single pixel/LED on the 5x5 matrix.
- Parameters
-
x | 0 to 4 column |
y | 0 to 4 row |
color | 1 for LEDs on, 0 for off |
◆ fillScreen()
void Adafruit_Microbit_Matrix::fillScreen |
( |
uint16_t |
color | ) |
|
Fill the 5x5 matrix with an LED 'color'.
- Parameters
-
color | 1 for LEDs on, 0 for off |
◆ show()
void Adafruit_Microbit_Matrix::show |
( |
const uint8_t |
bitmap[] | ) |
|
Display a 5-byte bitmap on the 5x5 LED matrix.
- Parameters
-
◆ scrollText()
void Adafruit_Microbit_Matrix::scrollText |
( |
char * |
string, |
|
|
uint8_t |
stepdelay = 150 |
|
) |
| |
Scroll display a string on the 5x5 LED matrix.
- Parameters
-
string | Null-terminated ascii string |
stepdelay | Milliseconds per scroll step |
◆ print() [1/4]
void Adafruit_Microbit_Matrix::print |
( |
char * |
string | ) |
|
Display a string on the 5x5 LED matrix.
- Parameters
-
string | Null-terminated ascii string |
◆ print() [2/4]
void Adafruit_Microbit_Matrix::print |
( |
int32_t |
i | ) |
|
Display a signed number on the 5x5 LED matrix.
- Parameters
-
◆ print() [3/4]
void Adafruit_Microbit_Matrix::print |
( |
int |
i | ) |
|
Display a signed number on the 5x5 LED matrix.
- Parameters
-
◆ print() [4/4]
void Adafruit_Microbit_Matrix::print |
( |
double |
f, |
|
|
int |
precision = 3 |
|
) |
| |
Display a floating point number on the 5x5 LED matrix.
- Parameters
-
f | The floating point value |
precision | Digits after decimal |
◆ EMPTYHEART
const uint8_t Adafruit_Microbit_Matrix::EMPTYHEART |
|
static |
Initial value:= {
B01010, B10101, B10001, B01010, B00100,
}
an empty heart icon
◆ HEART
const uint8_t Adafruit_Microbit_Matrix::HEART |
|
static |
Initial value:= {
B01010, B11111, B11111, B01110, B00100,
}
full heart icon
◆ NO
const uint8_t Adafruit_Microbit_Matrix::NO |
|
static |
Initial value:= {
B10001, B01010, B00100, B01010, B10001,
}
X icon.
◆ YES
const uint8_t Adafruit_Microbit_Matrix::YES |
|
static |
Initial value:= {
B00000, B00001, B00010, B10100, B01000,
}
Check icon.
◆ MICROBIT_SMILE
const uint8_t Adafruit_Microbit_Matrix::MICROBIT_SMILE |
|
static |
Initial value:= {
B00000, B01010, B00000, B10001, B01110,
}
smile icon
Preset smile image for LED matrix.
The documentation for this class was generated from the following files: