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

◆ Potentiometer()

Potentiometer::Potentiometer ( int pin,
u16 hysteresis = 0 )

Definition at line 30 of file potentiometer.cpp.hpp.

31 : mPot(pin), mListener(this), mHysteresis(hysteresis) {
32 // Initialize calibration range to full ADC range
33 mMinValue = 0;
35
36 // Read initial value
37 mCurrentValue = mPot.read();
39
40 // Auto-calculate hysteresis if not specified (1% of calibrated range)
41 if (mHysteresis == 0) {
43 }
44}
u16 calculateDefaultHysteresis() const
PotentiometerLowLevel mPot

References calculateDefaultHysteresis(), getAdcMaxValue(), mCurrentValue, mHysteresis, mLastValue, mListener, mMaxValue, mMinValue, and mPot.

Referenced by fl::Potentiometer::Listener::Listener(), and onChange().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: