-
Notifications
You must be signed in to change notification settings - Fork 1
/
SR7SEGNM.h
64 lines (49 loc) · 1.5 KB
/
SR7SEGNM.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
/*
---------------------------------------------------------------------
@Developer
1-Abdul Rehman
------------------------------------------------------------------
@license
|| | This library is free software; you can redistribute it and/or
|| | modify it under the terms of the GNU Lesser General Public
|| | License as published by the Free Software Foundation; version
|| | 2.1 of the License.
|| |
|| | This library is distributed in the hope that it will be useful,
|| | but WITHOUT ANY WARRANTY; without even the implied warranty of
|| | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|| | Lesser General Public License for more details.
|| |
|| | You should have received a copy of the GNU Lesser General Public
|| | License along with this library; if not, write to the Free Software
|| | Strange Lab., Abbot road shimla pahari, Lahore,Pakistan
||
||
||
*/
#ifndef SR7SEGNM_H_
#define SR7SEGNM_H_
#include <Arduino.h>
class SR7SEGNM{
public:
// methods
SR7SEGNM(int clockPin,int dataPin,int StrobPin,int nSegments);
void begin();/*will initialize pins and reset display*/
void offAllSegments(); /*Off all segments*/
void reset(); /*Put zero on all segments*/
void updateSegments(int segmentBuffer[]);
private:
// members
char numberOfSegments;
int clockPin;
int dataPin;
int strobPin;
//enum { arrsize = 11 };
/*
segChar array are seven segments codes
0-for off
1-for on [common cathod like or use with uln2003 etc]
*/
static const byte segChar[11];
};
#endif