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

Method Read

examples/LuminescentGrand/arduino/buttons.h:84–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 public:
83 Potentiometer(int sensor_pin) : mSensorPin(sensor_pin) {}
84 float Read() {
85 float avg = 0.0;
86 // Filter by reading the value multiple times and taking
87 // the average.
88 for (int i = 0; i < 8; ++i) {
89 avg += analogRead(mSensorPin);
90 }
91 avg = avg / 8.0f;
92 return avg;
93 }
94 private:
95 int mSensorPin;
96};

Callers

nothing calls this directly

Calls 1

analogReadFunction · 0.50

Tested by

no test coverage detected