Provides the basic functions to control the Hoist.
More...
#include <Hoist.h>
Provides the basic functions to control the Hoist.
Definition at line 28 of file Hoist.h.
◆ Hoist() [1/2]
◆ Hoist() [2/2]
Hoist::Hoist |
( |
int |
hoistServoPin, |
|
|
int |
hoistServoDelay, |
|
|
int |
posMax, |
|
|
int |
posMin |
|
) |
| |
Construct a new Hoist object.
- Parameters
-
hoistServoPin | - Pin-number on which the Servocontroll is connected |
hoistServoDelay | - Duration of the Delay in ms between the position-updates |
posMax | - Upper limit for servo-positon in degree |
posMin | - Lower limit for servo-position in degree |
Definition at line 22 of file Hoist.cpp.
◆ init()
Initialise the Hoist in the low position.
Definition at line 34 of file Hoist.cpp.
◆ raise()
Raise the Hoist 1° per servodelay/call until it's at positionMax.
You need to call attach() first so that the function works properly.
Definition at line 42 of file Hoist.cpp.
◆ lower()
Lower the Hoist 1° per servodelay/call until it's at positionMin.
You need to call attach() first so that the function works properly.
Definition at line 59 of file Hoist.cpp.
◆ attach()
attache servo to servopin
Definition at line 67 of file Hoist.h.
◆ detach()
detach servo from servopin
Definition at line 76 of file Hoist.h.
◆ hoistServo
Instance of servo object.
Definition at line 82 of file Hoist.h.
◆ servoPin
Servopin.
Definition at line 83 of file Hoist.h.
◆ position
actual servo-position
Definition at line 84 of file Hoist.h.
◆ positionMin
minimal possible position (Hardware-Restriction)
Definition at line 85 of file Hoist.h.
◆ positionMax
maximal possible position (Hardware-Restriction)
Definition at line 86 of file Hoist.h.
◆ servoDelay
delay in ms between raise/lower per 1 degree. This sets the servospeed
Definition at line 87 of file Hoist.h.
◆ currentMillis
unsigned long Hoist::currentMillis = 0 |
|
private |
will store current time for non blocking delay
Definition at line 89 of file Hoist.h.
◆ previousMillis
unsigned long Hoist::previousMillis = 0 |
|
private |
will store last time called for non blocking delay
Definition at line 90 of file Hoist.h.
The documentation for this class was generated from the following files: