AberLED shield library
Library for the bicolor LED (and TFT screen) shield used in CS12020
Classes | Macros | Enumerations | Variables
AberLED.h File Reference

The declaration for the AberLED class. Many implementation details are inside the AberLED implementation file AberLED.cpp. Note that there must be only one of these objects, but there's no code to enforce this. Weird things will happen if you have more than one. More...

#include "Arduino.h"

Go to the source code of this file.

Classes

class  AberLEDClass
 The class for the AberLED shield. One object of this class, called AberLED, is automatically created (similar to how Serial works). Yes, all this time you've been writing C++, not C. You should put AberLED. before every function, so AberLED.begin() instead of just begin(). More...
 

Macros

#define BLACK   0
 the "off" colour for pixels, used in set() More...
 
#define GREEN   1
 the green colour for pixels, used in set() More...
 
#define RED   2
 the red colour for pixels, used in set() More...
 
#define YELLOW   3
 the yellow colour for pixels, used in set() More...
 
#define REV00   0
 
#define REV01   1
 

Enumerations

enum  AberLEDFlags { AF_LEDDISPLAY = 1, AF_TFTDISPLAY = 2, AF_NOINTERRUPT = 4 }
 

Variables

int UP
 the number for button S1, the "up" button More...
 
int DOWN
 the number for button S2, the "down" button More...
 
int LEFT
 the number for button S3, the "right" button More...
 
int RIGHT
 the number for button S4, the "left" button More...
 
int FIRE
 the number for button S5, the "action" or "fire" button More...
 
AberLEDClass AberLED
 this is the single instance of the LED class - for documentation see AberLEDClass. More...
 

Detailed Description

The declaration for the AberLED class. Many implementation details are inside the AberLED implementation file AberLED.cpp. Note that there must be only one of these objects, but there's no code to enforce this. Weird things will happen if you have more than one.

Author
Jim Finnis (jcf1@.nosp@m.aber.nosp@m..ac.u.nosp@m.k)
Version
3.0
Date
5 September 2023

Definition in file AberLED.h.

Macro Definition Documentation

#define BLACK   0

the "off" colour for pixels, used in set()

Definition at line 21 of file AberLED.h.

#define GREEN   1

the green colour for pixels, used in set()

Definition at line 23 of file AberLED.h.

#define RED   2

the red colour for pixels, used in set()

Definition at line 25 of file AberLED.h.

#define REV00   0

Definition at line 32 of file AberLED.h.

#define REV01   1

Definition at line 34 of file AberLED.h.

#define YELLOW   3

the yellow colour for pixels, used in set()

Definition at line 27 of file AberLED.h.

Enumeration Type Documentation

Enumerator
AF_LEDDISPLAY 

Use the old-style bicolor LED display, not the TFT screen.

AF_TFTDISPLAY 

Use a TFT screen display (this is the default)

AF_NOINTERRUPT 

Do not set up the interrupt. The screen will not be refreshed automatically. You will need to do by calling refresh() often.

Definition at line 49 of file AberLED.h.

Variable Documentation

AberLEDClass AberLED

this is the single instance of the LED class - for documentation see AberLEDClass.

Definition at line 76 of file AberLED.cpp.

int DOWN

the number for button S2, the "down" button

Definition at line 48 of file AberLED.cpp.

int FIRE

the number for button S5, the "action" or "fire" button

Definition at line 48 of file AberLED.cpp.

int LEFT

the number for button S3, the "right" button

Definition at line 48 of file AberLED.cpp.

int RIGHT

the number for button S4, the "left" button

Definition at line 48 of file AberLED.cpp.

int UP

the number for button S1, the "up" button

Definition at line 48 of file AberLED.cpp.