-
Notifications
You must be signed in to change notification settings - Fork 0
Class IteratorValue
Hans Rothenbuehler edited this page Oct 22, 2023
·
2 revisions
| Topic | Specification |
|---|---|
| Description | Iterator steps by StepWidth between FromValue and ToValue. ECycleMode defines the kind and direction. StepTimeWidthMSec defines the duration of each step. Used e.g. to tests motors from MinSpeed to MaxSpeed, Servo between two angles, .... |
| Constructor |
IteratorValue(int FromValue, int ToValue, int StepWidth, int StepTimeWidthMSec, ECycleMode CycleMode) Parameter FromValue: Start valueToValue:End valueStepWidth: Optional with default 1. Step increment.StepTimeWidthMSec: Optional with default 50. Duration of each step in Milliseconds.CycleMode: Optional with default cmMin2Max_Min2Max (0). Defines the kind of the iteration.cmMin2Max_Min2Max (0): iterate from min to max e.g.: 1,2,3,4, 1,2,3,4, cmMin2Max2Min (1): iterate from min up max, down to min, up to max, … e.g. 1,2,3,4,3,2,1,2,3,4,3,2,1,… |
| Range | FromValue…ToValue |
| Samples | IteratorValue* iterator = new IteratorValue(0, 100); IteratorValue* iterator = new IteratorValue(0, 100, 5); IteratorValue* iterator = new IteratorValue(0, 100, 5, 1000); IteratorValue* iterator = new IteratorValue(0, 100, 10, 1000, cmMin2Max2Min); |
| Examples | Test 31, Test 50, … |
Wiki
Getting started
Classes
Input
- Calculate
- ConditionInput
- DependentInput
- DigitalInput
- FixValue
- Inverter
- IteratorValue
- JoystickAxis
- LoopSwitch
- MonoFlop
- Switch2Position
- Switch3Position
- Timer
- ToggleSwitch
- UltrasonicRangefinder
- VariableInput
Actuator
- ActuatorCollection
- Buzzer
- DigitalOutput
- EncoderMotorI2C
- EncoderMotorL298
- EncoderMotorL9110
- MotorI2C
- MotorL298
- MotorL9110
- MotorStepperRotate
- MotorStepperRotateI2C
- Servo360I2C
- Servo360PWM
- Servo360T1
- Servo360T2
- ServoPWM
- ServoStepperPosition
- ServoStepperPositionI2C
- ServoI2C
- ServoT1
- ServoT2
- VariableOutput
Condition
Relation
RemoteControl
Common
Sketches
Templates
Examples
- 01-Switch and Lamp
- 02-Dimming LED
- 03-Dimming LED with Switch
- 04-Blinking LED
- 05‐Motor fix speed, direction‐switch
- 06‐Motor variable speed, direction‐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
- 12-Servo360 controlled by a Joystick
- 13-Stepper motor with variable speed
- 14-RemoteControl of a motor with FlySky FS-i6X
- 15-RemoteControl of a motor with an App
- 16-EncoderMotor and LED controlled by FlySky-RemoteControl
- 17-Servo position in relation to a potentiometer
- 18-Stepper angle controlled by joystick
- 19-Buzzer tone in relation to distance
- 20-Dependent input
- 21-Alternate blink