-
Notifications
You must be signed in to change notification settings - Fork 0
Class Timer
Hans Rothenbuehler edited this page Oct 22, 2023
·
6 revisions
| Topic | Specification |
|---|---|
| Description | Tool class with no real input. The value toggles between 0 and 1 in a defined time interval. |
| Constructor |
Timer(unsigned long IntervalMSec, bool StartHigh, int Times) Parameter IntervalMSec: Interval of value change in Milliseconds StartHigh: Defines the value of the first interval.True: begins with high/1 False: begins with low/0 Times:Optional with default value -1.<=0: Endless >0: Only the defined amount times |
| Range | 0…1 |
| Const |
0: Timer::Low, Timer::Off1: Timer::High, Timer::On |
| Samples | Timer* timer = new Timer(1000, true); Timer* timer = new Timer(1000, false, 10); |
| Examples |
Example 04‐Blinking LED Example 21‐Alternate blink |
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