17Views0Replies

Author Options:

LM35 temperature sensor on nodemcu esp8266 Answered

How can I just get 1 decimal instead of to using Arduino IDE

here is output from serial monitor in DegreeC= 25.24

a part of the code

int analogValue = analogRead(outputpin);
float millivolts = (analogValue/1024.0) * 3300; //3300 is the voltage provided by NodeMCU float celsius = millivolts/12; Serial.print("in DegreeC= "); Serial.println(celsius);

Discussions