This repository has been archived by the owner on Mar 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LD5161B.h
106 lines (90 loc) · 1.54 KB
/
LD5161B.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#include <PCF8574.h>
class LD5161B {
private:
PCF8574 expander;
/**
* Shows number "0".
*
* @return void
*/
void displayZero();
/**
* Shows number "1".
*
* @return void
*/
void displayOne();
/**
* Shows number "2".
*
* @return void
*/
void displayTwo();
/**
* Shows number "3".
*
* @return void
*/
void displayThree();
/**
* Shows number "4".
*
* @return void
*/
void displayFour();
/**
* Shows number "5".
*
* @return void
*/
void displayFive();
/**
* Shows number "6".
*
* @return void
*/
void displaySix();
/**
* Shows number "7".
*
* @return void
*/
void displaySeven();
/**
* Shows number "8".
*
* @return void
*/
void displayEight();
/**
* Shows number "9".
*
* @return void
*/
void displayNine();
public:
/**
* The default constructor. Allows creating an empty array with
* LD5161B objects.
*
* @constructor
*/
LD5161B();
/**
* @param uint8_t deviceAddress Address to the expander.
*/
LD5161B(const uint8_t deviceAddress);
/**
* Turns off all the LEDs.
*
* @return void
*/
void off();
/**
* Shows given number on 7. segment display.
*
* @param unsigned short number Number to display.
* @return void
*/
void show(const unsigned short number);
};