Dilbert
Firmware for the Dilbert interactive badge.
 All Classes Files Functions Variables Enumerations Macros Pages
Public Member Functions | Static Public Attributes | List of all members
Dilbert Class Reference

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_ILI9341display ()
 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_MCP23017io ()
 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)
 

Detailed Description

Main hardware abstraction class.

Author
Dan Nixon

Member Function Documentation

uint16_t Dilbert::backlight ( ) const
inline

Gets the backlight intensity.

Returns
Intensity

Where 0 is off and 1023 is brightest.

void Dilbert::begin ( size_t  numNeoPixels = 8)

Initialises the badge hardware.

Parameters
numNeoPixelsNumber of neo pixels (defaults to 8)
UniversalInputManager& Dilbert::buttons ( )
inline

Gets the button manager.

Returns
Reference to the button manager
Adafruit_ILI9341& Dilbert::display ( )
inline

Gets the TFT display driver.

Returns
Reference to display driver
Adafruit_MCP23017& Dilbert::io ( )
inline

Gets the IO expender driver.

Returns
Reference to the IO expander 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.

Adafruit_NeoPixel& Dilbert::neoPixels ( )
inline

Gets the NeoPixel LED driver.

Returns
Reference to NeoPixel driver
void Dilbert::setBacklight ( uint16_t  intensity)

Sets the backlight intensity.

Parameters
intensityIntensity

Where 0 is off and 1023 is brightest.

void Dilbert::setBacklightOn ( bool  on)

Sets the backlight intensity.

Parameters
onBoolean intensity

The documentation for this class was generated from the following files: