Skip to content

Commit 433287e

Browse files
committed
Call stopAndReset() in setup
Closes #1
1 parent aa3c301 commit 433287e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Firmware/Balanduino/Balanduino.ino

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,6 @@ void setup() {
177177
// Set OC1A/OC1B on compare match when downcounting
178178
TCCR1A = (1 << COM1A1) | (1 << COM1B1);
179179

180-
setPWM(left, 0); // Turn off PWM on both pins
181-
setPWM(right, 0);
182-
183180
#ifdef ENABLE_USB
184181
if (Usb.Init() == -1) { // Check if USB Host is working
185182
Serial.print(F("OSC did not start"));
@@ -238,7 +235,8 @@ void setup() {
238235
/* Calibrate gyro zero value */
239236
while (calibrateGyro()); // Run again if the robot is moved while calibrating
240237

241-
LED::SetDirWrite();
238+
LED::SetDirWrite(); // Set LED pin to output
239+
stopAndReset(); // Turn off motors and reset different values
242240

243241
/* Beep to indicate that it is now ready */
244242
buzzer::Set();

0 commit comments

Comments
 (0)