MCPcopy Create free account
hub / github.com/FastLED/FastLED / ToggleButton

Method ToggleButton

examples/LuminescentGrand/arduino/buttons.h:12–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10class ToggleButton {
11 public:
12 ToggleButton(int pin) : mPin(pin), mOn(false), mDebounceTimestamp(0), mChanged(false) {
13 pinMode(mPin, OUTPUT);
14 digitalWrite(mPin, LOW);
15 fl::delay(1);
16 }
17
18 // true - button is pressed.
19 bool Read() {

Callers

nothing calls this directly

Calls 3

pinModeFunction · 0.50
digitalWriteFunction · 0.50
delayFunction · 0.50

Tested by

no test coverage detected