Display Formatierung und erster pseudo Reflow Ablauf

This commit is contained in:
Stefan 2020-10-14 00:06:14 +02:00
parent 4f56808d1c
commit 17a0d3e5ac
1 changed files with 18 additions and 6 deletions

View File

@ -27,6 +27,12 @@ const int buzzer = 5;
MAX6675 thermocouple(MAXCLK, MAXCS, MAXDO);
float oven_temp = 0.0;
float readTemperature(void) {
oven_temp = thermocouple.readCelsius();
}
void setup(void) {
Serial.begin(9600);
Serial.println("Hardware Test:");
@ -38,10 +44,10 @@ void setup(void) {
Serial.println("Buzzer Test");
tone(buzzer, 8000, 500);
Serial.print("C = ");
Serial.println(thermocouple.readCelsius());
Serial.print("F = ");
Serial.println(thermocouple.readFahrenheit());
Serial.print("C = ");
Serial.println(thermocouple.readCelsius());
Serial.print("F = ");
Serial.println(thermocouple.readFahrenheit());
}
long EncPos = 0;
@ -56,6 +62,8 @@ void loop(void) {
Serial.println();
EncPos = newEncPos;
}
readTemperature();
u8g2.firstPage();
do {
@ -65,7 +73,11 @@ void loop(void) {
u8g2.setFont(u8g2_font_ncenB10_tr);
u8g2.drawStr(0,11,"Ready to flow!");
u8g2.setFont(u8g2_font_ncenB18_tr);
u8g2.drawStr(0,47,"122°C");
u8g2.setCursor(0,47);
u8g2.print(oven_temp);
//u8g2.drawStr(0,47,"120C");
} while ( u8g2.nextPage() );
//delay(1000);
delay(500);
}