Moved to ESP32 and added webinterface for PenConfiguration.
Not working and removed: - AccelStepper: Move to FastAccelStepper for ESP32 - Servo: Changed to ESP32 - check if that is ok - Serial Comm Interface now at 115200 -> change back to 9600 later
This commit is contained in:
27
src/main.cpp
27
src/main.cpp
@@ -30,10 +30,10 @@
|
||||
//-----------------------------------------------------------------------------------------------------------
|
||||
|
||||
//make Objects
|
||||
AccelStepper rotMotor(AccelStepper::DRIVER, step1, dir1);
|
||||
AccelStepper penMotor(AccelStepper::DRIVER, step2, dir2);
|
||||
Servo penServo;
|
||||
SerialCommand SCmd;
|
||||
// AccelStepper rotMotor(AccelStepper::DRIVER, step1, dir1);
|
||||
// AccelStepper penMotor(AccelStepper::DRIVER, step2, dir2);
|
||||
// Servo penServo;
|
||||
// SerialCommand SCmd;
|
||||
//create Buttons
|
||||
#ifdef prgButton
|
||||
Button prgButtonToggle(prgButton, setprgButtonState);
|
||||
@@ -63,19 +63,18 @@ float rotSpeed=0;
|
||||
float penSpeed=0; // these are local variables for Function SteppermotorMove-Command, but for performance-reasons it will be initialized here
|
||||
boolean motorsEnabled = 0;
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
makeComInterface();
|
||||
initHardware();
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Serial.print("Starting...");
|
||||
//makeComInterface();
|
||||
//initHardware();
|
||||
startWebInterface();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
||||
|
||||
moveOneStep();
|
||||
SCmd.readSerial();
|
||||
|
||||
|
||||
// moveOneStep();
|
||||
// SCmd.readSerial();
|
||||
handleWebInterface();
|
||||
|
||||
#ifdef penToggleButton
|
||||
penToggle.check();
|
||||
|
||||
Reference in New Issue
Block a user