Crate seven_segment

Source
Expand description

Simple driver for 7-segment displays

This is a driver (encoder) for 7-segment displays. It’s implemented on top of embedded-hal, so you can use it on any platform that has pins with embedded_hal::OutputPin implemented.

The driver is very simple, only supports displays that connect directly using seven pins such as SA52-11EWA and doesn’t try to do anything clever like setting all pins at once. It supports both common anode and common cathode displays.

In order to use this crate, you have to instantiate SevenSegmentPins with your pins (see its documentation for a diagram) and convert it by calling appropriate with_common_*() method. Then just call set(your_digit_here) on the result whenever you want to change the shown digit.

Modules§

erased
Type erased definitions

Structs§

SevenSegment
Represents 7-segment display.
SevenSegmentPins
Pins of the 7-sement display

Enums§

Anode
Marker type for common anode
Cathode
Marker type for common cathode

Traits§

OutputPin
Single digital push-pull output pin
Polarity
Polarity of the common electrode.