|
@ -370,7 +370,7 @@ void Press() { |
|
|
delay(100); |
|
|
delay(100); |
|
|
Serial.write("pressing...\n"); |
|
|
Serial.write("pressing...\n"); |
|
|
|
|
|
|
|
|
// Reset Press before every coffee
|
|
|
|
|
|
|
|
|
// Slightly move the press in the opposite direction to make sure the motor's commutator engages
|
|
|
digitalWrite(invertWheelPin, HIGH); |
|
|
digitalWrite(invertWheelPin, HIGH); |
|
|
delay(100); |
|
|
delay(100); |
|
|
digitalWrite(invertWheelPin, LOW); |
|
|
digitalWrite(invertWheelPin, LOW); |
|
@ -404,9 +404,9 @@ void unPress() { |
|
|
delay(100); |
|
|
delay(100); |
|
|
Serial.write("unPressing...\n"); |
|
|
Serial.write("unPressing...\n"); |
|
|
|
|
|
|
|
|
// Reset Press before every coffee
|
|
|
|
|
|
|
|
|
// Slightly move the press in the opposite direction to make sure the motor's commutator engages
|
|
|
digitalWrite(wheelPin, HIGH); |
|
|
digitalWrite(wheelPin, HIGH); |
|
|
delay(150); |
|
|
|
|
|
|
|
|
delay(100); |
|
|
digitalWrite(wheelPin, LOW); |
|
|
digitalWrite(wheelPin, LOW); |
|
|
|
|
|
|
|
|
digitalWrite(invertWheelPin, HIGH); |
|
|
digitalWrite(invertWheelPin, HIGH); |
|
@ -503,6 +503,11 @@ void makeCoffee() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
delay(1000); // this delay is mandatory to prevent powder spillage caused by grinder inertia.
|
|
|
delay(1000); // this delay is mandatory to prevent powder spillage caused by grinder inertia.
|
|
|
|
|
|
|
|
|
|
|
|
// Slightly move the press in the opposite direction to make sure the press sensor makes contact
|
|
|
|
|
|
digitalWrite(wheelPin, HIGH); |
|
|
|
|
|
delay(1000); |
|
|
|
|
|
digitalWrite(wheelPin, LOW); |
|
|
unPress(); // unpressing the press to reset the machine
|
|
|
unPress(); // unpressing the press to reset the machine
|
|
|
|
|
|
|
|
|
if (unrecoverableErr == 1) { |
|
|
if (unrecoverableErr == 1) { |
|
@ -531,7 +536,7 @@ void makeCoffee() { |
|
|
digitalWrite(boilerPin, LOW); |
|
|
digitalWrite(boilerPin, LOW); |
|
|
} |
|
|
} |
|
|
delay(3000); // Allow pressure to wane
|
|
|
delay(3000); // Allow pressure to wane
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unPress(); // unpressing the press to reset the machine
|
|
|
unPress(); // unpressing the press to reset the machine
|
|
|
if (unrecoverableErr == 1) { |
|
|
if (unrecoverableErr == 1) { |
|
|
break; |
|
|
break; |
|
|