#define TMPPin A0//TMP36 attached to ESP8266 ESP-12E ADC String temperatureString = ""; //variable to hold the temperature reading void setup() { Serial.begin(115200); } void loop() { int tmpValue = analogRead(TMPPin); float voltage = tmpValue * 3.3;// converting that reading to voltage voltage /= 1024.0; float temperatureC = (voltage - 0.5) * 100 ; //converting from 10 mv per degree wit 500 mV offset //to degrees ((voltage - 500mV) times 100) float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0; //now convert to Fahrenheit temperatureString = " " + String(temperatureC) + " C " + String(temperatureF) + " F "; Serial.println(temperatureString); delay(1000); }