This website works better with JavaScript.
Home
Explore
Help
Register
Sign In
xaloc
/
7seg_numbers_arduino
Watch
2
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
0
Wiki
Activity
Browse Source
add on off functions
master
xaloc
4 years ago
parent
92a0591b48
commit
6824ce9f3a
3 changed files
with
18 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-0
keywords.txt
+14
-0
segNums.cpp
+2
-0
segNums.h
+ 2
- 0
keywords.txt
View File
@ -10,3 +10,5 @@ seven KEYWORD2
eight KEYWORD2
nine KEYWORD2
dot KEYWORD2
on KEYWORD2
off KEYWORD2
+ 14
- 0
segNums.cpp
View File
@ -96,3 +96,17 @@ void SegDisp::dot(int state)
digitalWrite
(
_pins
[
leds
[
i
]
]
,
state
)
;
}
}
void
SegDisp
:
:
on
(
)
{
for
(
int
i
=
0
;
i
<
8
;
i
+
+
)
{
digitalWrite
(
_pins
[
i
]
,
1
)
;
}
}
void
SegDisp
:
:
off
(
)
{
for
(
int
i
=
0
;
i
<
8
;
i
+
+
)
{
digitalWrite
(
_pins
[
i
]
,
0
)
;
}
}
+ 2
- 0
segNums.h
View File
@ -18,6 +18,8 @@ class SegDisp
void
eight
(
int
state
)
;
void
nine
(
int
state
)
;
void
dot
(
int
state
)
;
void
on
(
)
;
void
off
(
)
;
private
:
int
_pins
[
8
]
;
Write
Preview
Loading…
Cancel
Save