We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e244493 commit 6b269a5Copy full SHA for 6b269a5
1 file changed
examples/Ex_02_MultiBlink/Ex_02_MultiBlink.ino
@@ -25,6 +25,7 @@ public:
25
}
26
27
protected:
28
+ //setup the pins
29
virtual void setup()
30
{
31
pinMode(_pin, OUTPUT);
@@ -38,6 +39,20 @@ protected:
38
39
pinMode(_pin, INPUT);
40
_pinState = LOW;
41
42
+
43
+ //LEDs should be off when disabled
44
+ virtual void onDisable()
45
+ {
46
+ _pinState = LOW;
47
+ digitalWrite(_pin, _pinState);
48
+ }
49
50
+ //Start the LEDs on
51
+ virtual void onEnable()
52
53
+ _pinState = HIGH;
54
55
56
57
// Create our service routine
58
virtual void service()
0 commit comments