|
@ -1,5 +1,3 @@ |
|
|
// LAST UPDATE: NOVEMBER 2024
|
|
|
|
|
|
|
|
|
|
|
|
// Pinout configuration
|
|
|
// Pinout configuration
|
|
|
const int grinderPin = 9, pumpPin = 8, boilerPin = 6, powderPin = 7, wheelPin = 10, invertWheelPin = 11, powderSensorPin = 2, vaporSensorPin = 5, tempSensorPin = A7, wheelStartSensorPin = 4, wheelEndSensorPin = 3, redLED = 13, greenLED = 12; |
|
|
const int grinderPin = 9, pumpPin = 8, boilerPin = 6, powderPin = 7, wheelPin = 10, invertWheelPin = 11, powderSensorPin = 2, vaporSensorPin = 5, tempSensorPin = A7, wheelStartSensorPin = 4, wheelEndSensorPin = 3, redLED = 13, greenLED = 12; |
|
|
|
|
|
|
|
@ -204,7 +202,7 @@ void loop() { |
|
|
|
|
|
|
|
|
// making steam:
|
|
|
// making steam:
|
|
|
while (digitalRead(vaporSensorPin) == HIGH) { |
|
|
while (digitalRead(vaporSensorPin) == HIGH) { |
|
|
desiredTemp = 100; |
|
|
|
|
|
|
|
|
desiredTemp = 110; |
|
|
Serial.write("Vapor heating\n"); |
|
|
Serial.write("Vapor heating\n"); |
|
|
delay(500); |
|
|
delay(500); |
|
|
Heat(); // Heat the boiler to vapor temperature
|
|
|
Heat(); // Heat the boiler to vapor temperature
|
|
@ -404,7 +402,7 @@ void Press() { |
|
|
while (true) { |
|
|
while (true) { |
|
|
delay(milliseconds); |
|
|
delay(milliseconds); |
|
|
if (digitalRead(wheelEndSensorPin) == HIGH) { |
|
|
if (digitalRead(wheelEndSensorPin) == HIGH) { |
|
|
delay(90); // extra delay added to compensate for slightly incorrect endstop placement after repair
|
|
|
|
|
|
|
|
|
delay(1200); // extra delay added to compensate for slightly incorrect endstop placement after repair
|
|
|
digitalWrite(wheelPin, LOW); |
|
|
digitalWrite(wheelPin, LOW); |
|
|
delay(100); |
|
|
delay(100); |
|
|
Serial.write("Pressed\n"); |
|
|
Serial.write("Pressed\n"); |
|
@ -486,7 +484,7 @@ void makeCoffee() { |
|
|
// care must be taken to place these functions earlier in the code, or the compiler will rightfully freak out
|
|
|
// care must be taken to place these functions earlier in the code, or the compiler will rightfully freak out
|
|
|
while (true) { |
|
|
while (true) { |
|
|
|
|
|
|
|
|
desiredTemp = 80; |
|
|
|
|
|
|
|
|
desiredTemp = 90; |
|
|
Heat(); // First we pre-heat the boiler
|
|
|
Heat(); // First we pre-heat the boiler
|
|
|
if (unrecoverableErr == 1) { |
|
|
if (unrecoverableErr == 1) { |
|
|
break; |
|
|
break; |
|
@ -557,7 +555,7 @@ void makeCoffee() { |
|
|
if (dry == 0) { |
|
|
if (dry == 0) { |
|
|
//digitalWrite(boilerPin, HIGH);
|
|
|
//digitalWrite(boilerPin, HIGH);
|
|
|
delay(100); |
|
|
delay(100); |
|
|
desiredTemp = 95; // temperature to try and maintain while making coffee
|
|
|
|
|
|
|
|
|
desiredTemp = 100; // temperature to try and maintain while making coffee
|
|
|
Pump(); // Pump ratio (in seconds) will be read from serial input in final release
|
|
|
Pump(); // Pump ratio (in seconds) will be read from serial input in final release
|
|
|
digitalWrite(boilerPin, LOW); |
|
|
digitalWrite(boilerPin, LOW); |
|
|
} |
|
|
} |
|
|