Re: Teploměr
Napsal: 17 lis 2021, 13:49
I když teploměr odpojím anebo zapojím obráceně tak je to to samé
České fórum pro všechny nadšence do Arduina a dalších technologií.
https://forum.hwkitchen.cz/
Kód: Vybrat vše
// this example is public domain. enjoy!
// https://learn.adafruit.com/thermocouple/
#include "max6675.h"
int thermoDO = 19;
int thermoCS = 23;
int thermoCLK = 18;
MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
void setup() {
Serial.begin(9600);
Serial.println("MAX6675 test");
// wait for MAX chip to stabilize
delay(500);
}
void loop() {
// basic readout test, just print the current temp
Serial.print("C = ");
Serial.println(thermocouple.readCelsius());
Serial.print("F = ");
Serial.println(thermocouple.readFahrenheit());
// For the MAX6675 to update, you must delay AT LEAST 250ms between reads!
delay(1000);
}
Kód: Vybrat vše
#include <M5Stack.h>
// this example is public domain. enjoy!
// https://learn.adafruit.com/thermocouple/
#include "max6675.h"
int thermoDO = 19;
int thermoCS = 23;
int thermoCLK = 18;
MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
void setup() {
M5.begin(9600);
M5.Lcd.println("MAX6675 test");
// wait for MAX chip to stabilize
delay(500);
}
void loop() {
// basic readout test, just print the current temp
M5.Lcd.print("C = ");
M5.Lcd.println(thermocouple.readCelsius());
M5.Lcd.print("F = ");
M5.Lcd.println(thermocouple.readFahrenheit());
// For the MAX6675 to update, you must delay AT LEAST 250ms between reads!
delay(1000);
}
Kód: Vybrat vše
// this example is public domain. enjoy!
// https://learn.adafruit.com/thermocouple/
#include <M5Stack.h>
#include "max6675.h"
int thermoDO = 19;
int thermoCS = 23;
int thermoCLK = 18;
MAX6675 thermocouple(thermoCLK, thermoCS, thermoDO);
void setup() {
M5.begin(9600);
M5.Lcd.println("MAX6675 test");
}
void loop() {
// basic readout test, just print the current temp
delay(1000);
M5.Lcd.print("C = ");
M5.Lcd.println(thermocouple.readCelsius());
delay(1000);
M5.Lcd.print("F = ");
M5.Lcd.println(thermocouple.readFahrenheit());
}