We’re rewarding the question askers & reputations are being recalculated! Read more.

Hot answers tagged

1

If the provided source is cut down to the lines that have to do with the temperature, it is just this. If you try this sketch it should behave equally "wrong": const int sensor = A5; int tempc; float vout; void setup() { vout = analogRead(sensor); pinMode(sensor, INPUT); } void loop() { lcd.print(tempc); tempc = (vout * 500) / 1023; } In ...


1

Code seems to lack a repeating update of tempc via vout =analogRead(sensor); An alternative might be changing the line for setting tempc to be tempc=(int) (analogRead(sensor) * 500.0f/1023.0f);


Only top voted, non community-wiki answers of a minimum length are eligible