I am wanting to reduce the # of digits displayed on my LCD when running a temp. sensor program. Currently I am getting xx.xx digits and am looking to reduce it to xx. I am guessing there is an easy way to accomplish this but my searches turned up empty.
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
int sensorPin0 = 0; //Temp sensor to analog 0 pin
int sensorPin1 = 1;
int sensorPin2 = 2;
void setup() {
// set up the LCD's number of rows and columns:
lcd.begin(20, 4);
// Print a message to the LCD.
lcd.print(" Morgan Solar Inc.");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
int reading = analogRead(sensorPin1);
float Inside = (reading * 5.0 / 1024) * 100;
lcd.setCursor(0, 1);
lcd.print("Outside =");
lcd.setCursor(0, 2);
lcd.print("Inside = ");
lcd.setCursor(9, 2);
lcd.print(Inside);
lcd.setCursor(0, 3);
lcd.print("Panel Temp =");
lcd.setCursor(14, 2);
lcd.print("on/off");
}
This is what I got so far...first day messing with the controller and reading tons of tutorials