-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSevenSegment.h
38 lines (28 loc) · 862 Bytes
/
SevenSegment.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
#ifndef SevenSegment_h
#define SevenSegment_h
#include <Arduino.h>
class SevenSegment
{
public:
SevenSegment(int pinA, int pinB, int pinC, int pinD);
void numberZero(float timer = 1000);
void numberOne(float timer = 1000);
void numberTwo(float timer = 1000);
void numberThree(float timer = 1000);
void numberFour(float timer = 1000);
void numberFive(float timer = 1000);
void numberSix(float timer = 1000);
void numberSeven(float timer = 1000);
void numberEight(float timer = 1000);
void numberNine(float timer = 1000);
void chooseNumbers(int numberFirst, int numberSecond, float timer = 1000);
void allNumbers(float timer = 1000);
private:
int _pinA;
int _pinB;
int _pinC;
int _pinD;
void displayNumber(int number);
void binaryToDisplay(int statePinA, int statePinB, int statePinC, int statePinD);
};
#endif