In This Blog I will Just Interfacing LM35 Sensor With Esp32 Board They Will Show Analog Value In Serial Monitor.
Block Diagram :-
Circuit Diagram :-
Image Will Show The Code Of This Project
When LM35 Sensor Detect The Low Temperature
When LM35 Sensor Detect The High Temperature
//Prateek
//www.prateks.in
//https://www.youtube.com/c/JustDoElectronics
#define ADC_VREF_mV 3300.0
#define ADC_RESOLUTION 1024.0
#define PIN_LM35 33
void setup() {
Serial.begin(9600);
}
void loop() {
int adcVal = analogRead(PIN_LM35);
float milliVolt = adcVal * (ADC_VREF_mV / ADC_RESOLUTION);
float tempC = milliVolt / 10;
float tempF = tempC * 9 / 5 + 32;
Serial.print("Temperature: ");
Serial.print(tempC);
Serial.print("°C");
Serial.print(" ~ ");
Serial.print(tempF);
Serial.println("°F");
delay(500);
}
Result
Link:https://www.prateeks.in/2022/06/esp32-interfacing-with-lm35.html
https://lastminuteengineers.com/lm35-temperature-sensor-arduino-tutorial/