22 Hoist::Hoist(
int hoistServoPin,
int hoistServoDelay,
int posMax,
int posMin) : servoPin(hoistServoPin),
26 servoDelay(hoistServoDelay) {
27 DBFUNCCALLln(
"Hoist::Hoist(int hoistServoPin, int hoistServoDelay, int posMax, int posMin)");
43 DBFUNCCALLln(
"Hoist::raise()");
53 DBSTATUSln(
"Hoist raised!");
60 DBFUNCCALLln(
"Hoist::lower()");
70 DBSTATUSln(
"Hoist lowered!");
void detach()
detach servo from servopin
void init()
Initialise the Hoist in the low position.
bool lower()
Lower the Hoist 1° per servodelay/call until it's at positionMin.
unsigned long currentMillis
will store current time for non blocking delay
int servoDelay
delay in ms between raise/lower per 1 degree. This sets the servospeed
int positionMin
minimal possible position (Hardware-Restriction)
int positionMax
maximal possible position (Hardware-Restriction)
int position
actual servo-position
Servo hoistServo
Instance of servo object.
bool raise()
Raise the Hoist 1° per servodelay/call until it's at positionMax.
The Class Hoist provides the basic functions for the hoist.
void attach()
attache servo to servopin
unsigned long previousMillis
will store last time called for non blocking delay