FastLED 3.9.15
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages

◆ 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(pin_, INPUT);
48 bool on = (digitalRead(pin_) == HIGH);
49 // Switch the pin back to output so that we can enable the
50 // pulldown resister.
51 pinMode(pin_, OUTPUT);
52 digitalWrite(pin_, LOW);
53 return on;
54 }

References pin_.

Referenced by Update().

+ Here is the caller graph for this function: