Dilbert
Firmware for the Dilbert interactive badge.
|
Main hardware abstraction class. More...
#include <Dilbert.h>
Public Member Functions | |
Dilbert () | |
Create a new driver. | |
void | begin (size_t numNeoPixels=8) |
Initialises the badge hardware. More... | |
Adafruit_ILI9341 & | display () |
Gets the TFT display driver. More... | |
uint16_t | backlight () const |
Gets the backlight intensity. More... | |
void | setBacklightOn (bool on) |
Sets the backlight intensity. More... | |
void | setBacklight (uint16_t intensity) |
Sets the backlight intensity. More... | |
Adafruit_NeoPixel & | neoPixels () |
Gets the NeoPixel LED driver. More... | |
Adafruit_MCP23017 & | io () |
Gets the IO expender driver. More... | |
UniversalInputManager & | buttons () |
Gets the button manager. More... | |
Static Public Attributes | |
static const uint8_t | MCP23017_INT_GPIO = 1 |
MCP23017 interrupt GPIO (on UART0 Tx) | |
static const uint8_t | SD_CS_GPIO = 3 |
SD chip select GPIO (on UART0 Rx) | |
static const uint8_t | TFT_CS_GPIO = 0 |
TFT chip select GPIO. | |
static const uint8_t | TFT_DC_GPIO = 2 |
TFT DC GPIO. | |
static const uint8_t | TFT_BACKLIGHT_GPIO = 16 |
TFT backlight GPIO. | |
static const uint8_t | NEOPIXEL_GPIO = 15 |
NeoPIxel GPIO. | |
static const uint8_t | BUTTON_UP = 1 |
Up buppion GPIO (on MCP23017) | |
static const uint8_t | BUTTON_DOWN = 2 |
Down button GPIO (on MCP23017) | |
static const uint8_t | BUTTON_LEFT = 0 |
Left button GPIO (on MCP23017) | |
static const uint8_t | BUTTON_RIGHT = 3 |
Right button GPIO (on MCP23017) | |
static const uint8_t | BUTTON_A = 4 |
A button GPIO (on MCP23017) | |
static const uint8_t | BUTTON_B = 5 |
B button GPIO (on MCP23017) | |
Main hardware abstraction class.
|
inline |
Gets the backlight intensity.
Where 0 is off and 1023 is brightest.
void Dilbert::begin | ( | size_t | numNeoPixels = 8 | ) |
Initialises the badge hardware.
numNeoPixels | Number of neo pixels (defaults to 8) |
|
inline |
Gets the button manager.
|
inline |
Gets the TFT display driver.
|
inline |
Gets the IO expender driver.
Warning: some of the IO pins are used for specific functions that are managed elsewhere, do not set a pin that alreadyhas a function, this will probably break something else.
|
inline |
Gets the NeoPixel LED driver.
void Dilbert::setBacklight | ( | uint16_t | intensity | ) |
Sets the backlight intensity.
intensity | Intensity |
Where 0 is off and 1023 is brightest.
void Dilbert::setBacklightOn | ( | bool | on | ) |
Sets the backlight intensity.
on | Boolean intensity |