FastLED 3.9.15
Loading...
Searching...
No Matches

◆ Read_Internal()

bool ToggleButton::Read_Internal ( )
inlineprivate

Definition at line 45 of file buttons.h.

45 {
46 // Toggle the pin back to INPUT and take a reading.
47 pinMode(mPin, INPUT);
48 bool on = (digitalRead(mPin) == HIGH);
49 // Switch the pin back to output so that we can enable the
50 // pulldown resister.
51 pinMode(mPin, OUTPUT);
52 digitalWrite(mPin, LOW);
53 return on;
54 }
void pinMode(int pin, PinMode mode)
Set pin mode (input, output, pull-up, pull-down)
Definition pin.cpp.hpp:378
PinValue digitalRead(int pin)
Read digital value from pin.
Definition pin.cpp.hpp:55
void digitalWrite(int pin, PinValue val)
Write digital value to pin.
Definition pin.cpp.hpp:51

References mPin.

Referenced by Update().

+ Here is the caller graph for this function: