Display Formatierung und erster pseudo Reflow Ablauf
This commit is contained in:
parent
4f56808d1c
commit
17a0d3e5ac
|
@ -27,6 +27,12 @@ const int buzzer = 5;
|
||||||
|
|
||||||
MAX6675 thermocouple(MAXCLK, MAXCS, MAXDO);
|
MAX6675 thermocouple(MAXCLK, MAXCS, MAXDO);
|
||||||
|
|
||||||
|
float oven_temp = 0.0;
|
||||||
|
|
||||||
|
float readTemperature(void) {
|
||||||
|
oven_temp = thermocouple.readCelsius();
|
||||||
|
}
|
||||||
|
|
||||||
void setup(void) {
|
void setup(void) {
|
||||||
Serial.begin(9600);
|
Serial.begin(9600);
|
||||||
Serial.println("Hardware Test:");
|
Serial.println("Hardware Test:");
|
||||||
|
@ -38,10 +44,10 @@ void setup(void) {
|
||||||
Serial.println("Buzzer Test");
|
Serial.println("Buzzer Test");
|
||||||
tone(buzzer, 8000, 500);
|
tone(buzzer, 8000, 500);
|
||||||
|
|
||||||
Serial.print("C = ");
|
Serial.print("C = ");
|
||||||
Serial.println(thermocouple.readCelsius());
|
Serial.println(thermocouple.readCelsius());
|
||||||
Serial.print("F = ");
|
Serial.print("F = ");
|
||||||
Serial.println(thermocouple.readFahrenheit());
|
Serial.println(thermocouple.readFahrenheit());
|
||||||
}
|
}
|
||||||
|
|
||||||
long EncPos = 0;
|
long EncPos = 0;
|
||||||
|
@ -56,6 +62,8 @@ void loop(void) {
|
||||||
Serial.println();
|
Serial.println();
|
||||||
EncPos = newEncPos;
|
EncPos = newEncPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readTemperature();
|
||||||
|
|
||||||
u8g2.firstPage();
|
u8g2.firstPage();
|
||||||
do {
|
do {
|
||||||
|
@ -65,7 +73,11 @@ void loop(void) {
|
||||||
u8g2.setFont(u8g2_font_ncenB10_tr);
|
u8g2.setFont(u8g2_font_ncenB10_tr);
|
||||||
u8g2.drawStr(0,11,"Ready to flow!");
|
u8g2.drawStr(0,11,"Ready to flow!");
|
||||||
u8g2.setFont(u8g2_font_ncenB18_tr);
|
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() );
|
} while ( u8g2.nextPage() );
|
||||||
//delay(1000);
|
|
||||||
|
|
||||||
|
delay(500);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue