|
@@ -19,7 +19,7 @@ EasyButton brightness_plus(BRIGHT_PLUS);
|
|
|
EasyButton brightness_min(BRIGHT_MIN);
|
|
|
EasyButton cover_control(COVER_FF);
|
|
|
|
|
|
-#ifdef UNIPOLAR
|
|
|
+#if UNIPOLAR
|
|
|
AccelStepper stepper(AccelStepper::FULL4WIRE, STEP_PIN1, STEP_PIN3, STEP_PIN2, STEP_PIN4);
|
|
|
#else
|
|
|
AccelStepper stepper(AccelStepper::DRIVER, STEP_PIN, DIR_PIN);
|
|
@@ -48,7 +48,7 @@ void setup()
|
|
|
LOG("Initializing stepper");
|
|
|
stepper.setMaxSpeed(1000);
|
|
|
stepper.setAcceleration(50);
|
|
|
- stepper.setSpeed(400);
|
|
|
+ stepper.setSpeed(200);
|
|
|
//stepper.moveTo(STEPS);
|
|
|
}
|
|
|
|
|
@@ -250,7 +250,7 @@ void openFlipFlat()
|
|
|
setBrightness(0);
|
|
|
|
|
|
motorDirection = OPENING;
|
|
|
- rotateMotor(270.0);
|
|
|
+ rotateMotor(OPEN_ANGLE);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -260,7 +260,7 @@ void closeFlipFlat()
|
|
|
if (coverStatus != CLOSED)
|
|
|
{
|
|
|
motorDirection = CLOSING;
|
|
|
- rotateMotor(270.0);
|
|
|
+ rotateMotor(OPEN_ANGLE);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
@@ -305,7 +305,9 @@ void setupSerial()
|
|
|
|
|
|
#ifdef __AVR_ATmega32U4__
|
|
|
FF_SERIAL.begin(9600);
|
|
|
+#if DEBUG
|
|
|
LOG_SERIAL.begin(9600);
|
|
|
+#endif
|
|
|
#endif
|
|
|
|
|
|
LOG("Logging serial up and running");
|