#define NTC 0
#define RELAY 9
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(NTC, INPUT);
pinMode(RELAY, OUTPUT);
}
void loop() {
const float BETA = 3950; // should match the Beta Coefficient of the thermistor
int analogValue = analogRead(A0);
float celsius = 1 / (log(1 / (1023. / analogValue - 1)) / BETA + 1.0 / 298.15) - 273.15;
if (analogValue < 1820){
digitalWrite(RELAY, LOW);
}
else {
analogWrite(RELAY, HIGH);
}
Serial.print(celsius);
delay (1000);
}
//25 puanlık final çalışmasıLoading
esp32-c3-devkitm-1
esp32-c3-devkitm-1