@@ -92,8 +92,9 @@ int main(void)
// Check for problems on startup
if(clock_fail) {
//ssd1306_DrawStringBig("ERROR: Check Xtal", 2, 0);
ssd1306_DrawStringBig("XTAL ERR", 2, 0);
delay(5000);
ssd1306_DrawStringBig("NO XTAL", 2, 0);
delay(1000);
ssd1306_clearscreen();
}
// Init USB
@@ -264,9 +265,7 @@ void process()
char tempstr[6];
itoa(ssr_output, tempstr);
ssd1306_DrawString("#=", 2, 45);
ssd1306_DrawString(" ", 2, 57);
ssd1306_DrawString(tempstr, 2, 57);
ssd1306_DrawString(tempstr, 0, 90);
GPIO_SetBits(LED_STAT);
GPIO_SetBits(SSR_PIN);
@@ -285,12 +284,11 @@ void process()
void draw_setpoint() {
char tempstr[3];
itoa_fp(temp, temp_frac, tempstr);
//ssd1306_DrawString(" ", 3, 40);
ssd1306_DrawString(tempstr, 3, 40);
ssd1306_DrawString("-> ", 3, 80);
ssd1306_DrawStringBig(tempstr, 3, 0);
ssd1306_DrawStringBig(">", 3, 74);
itoa(setpoint, tempstr);
ssd1306_DrawString(" ", 3, 95);
ssd1306_DrawString(tempstr, 3, 95);
ssd1306_DrawStringBig(" ", 3, 90);
ssd1306_DrawStringBig(tempstr, 3, 90);
uint8_t goto_mode = 2;
@@ -594,8 +592,8 @@ void machine()
// Write text to OLED
// [ therm : preheating brew ]
// [ 30 => 120 C ]
ssd1306_DrawString("Preheating...", 0, 40);
ssd1306_drawlogo();
ssd1306_DrawString("Preheating...", 0, 0);
//ssd1306_drawlogo();
draw_setpoint();
pid_enabled = 1;
setpoint = setpoint_brew;
@@ -621,8 +619,8 @@ void machine()
// [ therm : ready to brew ]
ssd1306_DrawString("Ready to Brew!", 0, 40);
ssd1306_DrawString("Preheated!", 0, 0);
@@ -646,8 +644,8 @@ void machine()
// [ therm : preheating steam ]
setpoint = setpoint_steam;
@@ -673,8 +671,8 @@ void machine()
// [ therm : ready to steam ]
ssd1306_DrawString("Ready to Steam!", 0, 40);
ssd1306_DrawString("Ready to Steam!", 0, 0);
Status change: