add on off functions
This commit is contained in:
parent
92a0591b48
commit
6824ce9f3a
|
@ -10,3 +10,5 @@ seven KEYWORD2
|
|||
eight KEYWORD2
|
||||
nine KEYWORD2
|
||||
dot KEYWORD2
|
||||
on KEYWORD2
|
||||
off KEYWORD2
|
||||
|
|
14
segNums.cpp
14
segNums.cpp
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user