2024-10-2901
This commit is contained in:
parent
1c4a140443
commit
55b82f59e5
14
src/main.cpp
14
src/main.cpp
|
@ -56,6 +56,12 @@ Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
|
||||||
|
|
||||||
#define NUMFLAKES 10 // Number of snowflakes in the animation example
|
#define NUMFLAKES 10 // Number of snowflakes in the animation example
|
||||||
|
|
||||||
|
void blink(){
|
||||||
|
digitalWrite (LED_Blue, HIGH);
|
||||||
|
delay(100);
|
||||||
|
digitalWrite (LED_Blue, !HIGH);
|
||||||
|
}
|
||||||
|
|
||||||
void drawIST(float wert){
|
void drawIST(float wert){
|
||||||
char msgt[20];
|
char msgt[20];
|
||||||
String mw;
|
String mw;
|
||||||
|
@ -110,10 +116,12 @@ void loop() {
|
||||||
|
|
||||||
Serial.print("RTD value: "); Serial.println(rtd);
|
Serial.print("RTD value: "); Serial.println(rtd);
|
||||||
float ratio = rtd;
|
float ratio = rtd;
|
||||||
|
float messung;
|
||||||
ratio /= 32768;
|
ratio /= 32768;
|
||||||
Serial.print("Ratio = "); Serial.println(ratio,8);
|
Serial.print("Ratio = "); Serial.println(ratio,8);
|
||||||
Serial.print("Resistance = "); Serial.println(RREF*ratio,8);
|
Serial.print("Resistance = "); Serial.println(RREF*ratio,8);
|
||||||
Serial.print("Temperature = "); Serial.println(thermo.temperature(RNOMINAL, RREF));
|
messung = thermo.temperature(RNOMINAL, RREF);
|
||||||
|
Serial.print("Temperature = "); Serial.println(messung);
|
||||||
|
|
||||||
/* display.clearDisplay();
|
/* display.clearDisplay();
|
||||||
display.setCursor(0,0); // Start at top-left corner
|
display.setCursor(0,0); // Start at top-left corner
|
||||||
|
@ -122,7 +130,7 @@ void loop() {
|
||||||
display.println(thermo.temperature(RNOMINAL, RREF));
|
display.println(thermo.temperature(RNOMINAL, RREF));
|
||||||
display.display(); */
|
display.display(); */
|
||||||
|
|
||||||
drawIST(thermo.temperature(RNOMINAL, RREF));
|
drawIST(messung);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -151,6 +159,6 @@ void loop() {
|
||||||
thermo.clearFault();
|
thermo.clearFault();
|
||||||
}
|
}
|
||||||
Serial.println();
|
Serial.println();
|
||||||
digitalWrite (LED_Blue, !digitalRead(LED_Blue));
|
blink();
|
||||||
delay(5000);
|
delay(5000);
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user