Class VariableInput - GSTCH/SketchMadeEASY GitHub Wiki

Input VariableInput

Topic Specification
Description Represent an analog input pin (e.g. potentiometer).
Define the pin A0...Ax into constructor.
To filter the smallest changes, there is the ConsideredMinChange parameter. Changes less than or equal to this value are suppressed.
Constructor ** VariableInput (int Pin, int ConsideredMinChange)**
Parameter
Pin: Pin number
ConsideredMinChange: Optional with default is 5. The logic ignores changes less than or equal than this value.
Range 0…1023
Const
Samples VariableInput* input = new VariableInput(A1);
VariableInput* input = new VariableInput(A2, 10);
Examples 02-Dimming LED
03-Dimming LED with Switch
06‐Motor variable speed, On/Off‐Switch
07‐Motor variable speed, direction‐ and main‐switch
08‐Motor toggles between limit switches
09‐Motor toggles between limit switches, main switch
10‐Main Motor turns between limit switches, second follows
11-Two motors, one turns after the other
13-Stepper motor with variable speed
17-Servo position in relation to a potentiometer
20-Dependent input
⚠️ **GitHub.com Fallback** ⚠️