Use library for smooth pen servo move.
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "EggDuino.h"
|
||||
#include <ServoEasing.hpp>
|
||||
|
||||
// EXTRAFEATURES - UNCOMMENT TO USE THEM -------------------------------------------------------------------
|
||||
|
||||
@@ -34,7 +35,7 @@ FastAccelStepper *g_pStepperRotate = NULL;
|
||||
FastAccelStepper *g_pStepperPen = NULL;
|
||||
|
||||
// make Objects
|
||||
Servo penServo;
|
||||
ServoEasing penServo;
|
||||
SerialCommand SCmd;
|
||||
#ifdef ESP32
|
||||
SerialCommand g_BLECmd;
|
||||
@@ -61,8 +62,8 @@ Button motorsToggle(motorsButton, toggleMotors);
|
||||
// Variables... be careful, by messing around here, everything has a reason and crossrelations...
|
||||
int g_iPenUpPos = 5; // can be overwritten from EBB-Command SC
|
||||
int g_iPenDownPos = 20; // can be overwritten from EBB-Command SC
|
||||
int g_iServoRateUp = 0; // from EBB-Protocol not implemented on machine-side
|
||||
int g_iServoRateDown = 0; // from EBB-Protocol not implemented on machine-side
|
||||
int g_iServoRateUp = 0; // from EBB-Protocol, mapped to ServoEasing speed (up movement)
|
||||
int g_iServoRateDown = 0; // from EBB-Protocol, mapped to ServoEasing speed (down movement)
|
||||
long g_iRotStepError = 0;
|
||||
long g_iPenStepError = 0;
|
||||
int g_iPenState = g_iPenUpPos;
|
||||
|
||||
Reference in New Issue
Block a user