const int SLA = 14;
int las;
float BETA = 3950;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
pinMode(SLA, INPUT);
}
void loop() {
// put your main code here, to run repeatedly:
delay(10); // this speeds up the simulation
las = analogRead(SLA);
float celsius = 1 / (log(1 / (4095. / las - 1)) / BETA + 1.0 / 298.15) - 273.15;
delay(100);
Serial.println(celsius);
Serial.println(las);
}