Added invert function to loop
This commit is contained in:
@@ -201,5 +201,7 @@ void checkInvert() {
|
||||
shade[i] = shade[i]*-1;
|
||||
}
|
||||
invertMotor[1] = invertMotor[0]; //Set change flag
|
||||
configSave();
|
||||
Serial.println("Direction Inverted");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,6 +233,7 @@ void loop() {
|
||||
|
||||
oldBrightness = ledBrightness;
|
||||
currentDistance = stepper.distanceToGo();
|
||||
checkInvert();
|
||||
|
||||
if (ledFeedback == true) {
|
||||
ledFeedbackf();
|
||||
@@ -249,7 +250,6 @@ void loop() {
|
||||
|
||||
//If not moving, run extra features
|
||||
if (stepper.distanceToGo() == 0) {
|
||||
blynkRun(); //Only run blynk when the stepper is not active
|
||||
|
||||
if (setHome == true) {
|
||||
resetHold(); //Set current position as home
|
||||
|
||||
Reference in New Issue
Block a user