diff --git a/hot_fermentation.ino b/hot_fermentation.ino index ca41c6e..d4881aa 100644 --- a/hot_fermentation.ino +++ b/hot_fermentation.ino @@ -85,11 +85,13 @@ char timeBuffer[10]; void setup() { pinMode(ssrPin, OUTPUT); Serial.begin(9600); + oled.init(); // Initialize the OLED oled.clear(); // Clear the display readEEPROM(); myPID.SetMode(AUTOMATIC); myPID.SetOutputLimits(0, 1); + } void loop() { @@ -274,7 +276,7 @@ void printPhases() { formatTime((currentTime - finishTime) / 1000, timeBuffer); // Time since completion oled.print(timeBuffer); oled.print(" "); - oled.print(Input,1); + oled.print(Input,0); oled.print("c"); oled.print("->"); oled.print((int)Setpoint); @@ -295,7 +297,6 @@ void printPhases() { formatTime(totalProcessTime, timeBuffer); oled.print(timeBuffer); oled.print(" "); - for (int i = 0; i < activeProfile.numPhases; i++) { if (i == currentPhase) { @@ -335,8 +336,8 @@ void printPhases() { oled.invertText(false); // Ensure text inversion is off after the loop oled.setCursor(110,7); - oled.print(Output*100,0); - oled.print(" "); + sprintf(timeBuffer, "%3d", (int)(Output*100)); + oled.print(timeBuffer); oled.update(); }