Drivers
SevenSegmentDisplay
The SevenSegmentDisplay
driver is used to drive a single seven segment display module.
Where to buy
https://www.aliexpress.com/item/1005001616709100.html
How to wire
The module has 10 pins. 7 of them are for each segment of the display module. One is for the decimal point, and two are common ground.
Each pin should be connected to a valid GPIO pin, and you should put a 330 ohm resistor between each LED. This means you will have 8 LEDs.
You can’t just place a single resistor for all the LEDs. If you do this, you’ll get varying brightness depending on how many segments are illuminated.
Using the driver
Instantiate the driver using the static make()
function, passing a reference to each pin.
You can call the following methods on the driver: