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

Method Read_Internal

examples/LuminescentGrand/arduino/buttons.h:45–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43
44 private:
45 bool Read_Internal() {
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 }
55
56
57 int mPin;

Callers

nothing calls this directly

Calls 3

pinModeFunction · 0.50
digitalReadFunction · 0.50
digitalWriteFunction · 0.50

Tested by

no test coverage detected