unsigned long present, time_end, minute = 1000;
int mash_temp[4], mash_time[4] = {0, 3, 2, 1}, hop_time[5], boil_time;
int step;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
present = millis();
step = 1;
}
void loop() {
if (step == 1) {
time_end = present + mash_time[1] * minute;
if (millis() >= time_end) {
Serial.println("time end 1!");
step = 2;
present = millis();
}
}
if (step == 2) {
time_end = present + mash_time[2] * minute;
if (millis() >= time_end) {
Serial.println("time end 2!");
step = 3;
present = millis();
}
}
if (step == 3) {
time_end = present + mash_time[3] * minute;
if (millis() >= time_end) {
Serial.println("time end 3!");
step = 4;
present = millis();
}
}
if (step == 4) {
Serial.println("heat for sparge!");
while (1 == 1) {}
}
}
void boiling() {
}