Motors moving
This commit is contained in:
@@ -11,13 +11,32 @@
|
||||
#include <Servo.h>
|
||||
#endif
|
||||
|
||||
#include <AccelStepper.h>
|
||||
#include <FastAccelStepper.h>
|
||||
#include "SerialCommand.h"
|
||||
#include "button.h"
|
||||
|
||||
// implemented Eggbot-Protocol-Version v13
|
||||
#define initSting "EBBv13_and_above Protocol emulated by Eggduino-Firmware V1.6a"
|
||||
|
||||
#ifdef ESP32
|
||||
|
||||
// Rotational Stepper
|
||||
#define dir1 16
|
||||
#define enableRotMotor 12
|
||||
#define step1 26
|
||||
#define rotMicrostep 32
|
||||
|
||||
// Pen Stepper
|
||||
#define step2 25
|
||||
#define dir2 27
|
||||
#define enablePenMotor 12
|
||||
#define penMicrostep 32
|
||||
|
||||
#define servoPin 17
|
||||
|
||||
|
||||
#else
|
||||
|
||||
// Rotational Stepper
|
||||
#define step1 2
|
||||
#define dir1 5
|
||||
@@ -32,6 +51,9 @@
|
||||
|
||||
#define servoPin 4
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
struct ConfigParameter {
|
||||
const char *key;
|
||||
int *value;
|
||||
@@ -39,8 +61,12 @@ struct ConfigParameter {
|
||||
int defaultValue;
|
||||
};
|
||||
|
||||
extern AccelStepper rotMotor;
|
||||
extern AccelStepper penMotor;
|
||||
extern FastAccelStepperEngine g_stepEngine;
|
||||
extern FastAccelStepper *g_pStepperRotate;
|
||||
extern FastAccelStepper *g_pStepperPen;
|
||||
|
||||
// extern FastAccelStepper rotMotor;
|
||||
// extern FastAccelStepper penMotor;
|
||||
extern Servo penServo;
|
||||
extern SerialCommand SCmd;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user