Usage¶
Simple input and output devices¶
For more information about the simple peripherals, please see the arduino-peripherals documentation.
Display¶
The display constructor takes three parameters, which on this board should have the following values.
parameter | value |
---|---|
clockPin |
7 |
dataPin |
8 |
latchPin |
4 |
The display class has the following functions.
function | description |
---|---|
clear |
Clear the display. |
delay |
Set the refresh delay time. |
displayInt |
Display an integer value. |
refresh |
Display refresh. |
Example¶
We typically initialise the display as follows.
#include <display.h>
Display display(7, 8, 4);
To refresh the display, add the following line to the loop()
body.
void loop(void) {
display.refresh();
}
The display can be set to a specific brightness and can be used to show signed integers.
display.delay(20); // Dim the display.
display.displayInt(-123); // Show the string "-123".