Hello all! I’ve been working on a simple thermometer to use in my house. I wrote some code for it, simulated the circuit on AutoDesk, built the circuit part for part anddddd… the LCD is flickering. I have read other forum posts that didn’t really help me out either. I checked my connections numerous times and even went through the trouble of rebuilding the circuit again. Twice. I am kind of new to this, can anyone help?
#define aref_voltage 3.3
int tempPin = 0;
LiquidCrystal lcd (12, 11, 5, 4, 3, 2);
//someone from another forum said that I should do this
tempReading = analogRead(tempPin);
float voltage = tempReading * aref_voltage;
voltage /= 1023.0;
float TemperatureC = (voltage - 0.5) * 100;
float TemperatureF = (TemperatureC * 9.0/5.0) + 32.0;
//someone said that the refresh rate of the analog signal (coming off of A1)
//should be less than a few times a second for the LCD to “catch up”
//changing the delay didn’t really help, although I’d like to keep it
//around 1000 ms.
Thermometer.ino (950 Bytes)