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.

Constructor parameters.
parameter value
clockPin 7
dataPin 8
latchPin 4

The display class has the following functions.

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".

Demo

A demo is provided to show the full functionality of the display and other peripherals. This demo is written in Python 3.

First make sure all dependencies are installed.

pip install -r requirements.txt

Run the demo as follows.

python demo.py