Hello, I'm pulling my hair out over this one...
I've made a temp display from an Arduino uno, MAX6675, LCD2004, and a High temp k type thermocouple.
the LCD display wont show all the numbers. if the temperature is 68.80 in the serial monitor it shows as 6.80*F on the LCD Display
How can I get the LCD to display all the numbers for the temperature
#include "max6675.h"// this file is part of the library. See video for details
// start of settings for LCD2004 with I2C
#include <Wire.h>
#include <LiquidCrystal_I2C.h>// this file is part of the library. See video for details
// Set the LCD address to 0x27 for a 20 chars and 4 line display
LiquidCrystal_I2C lcd(0x27, 20, 4);
// end of settings for LCD2004 with I2C
int soPin = 12;// SO=Serial Out
int csPin = 10;// CS = chip select CS pin
int sckPin = 13;// SCK = Serial Clock pin
MAX6675 thermocouple(sckPin, csPin, soPin);
void setup() {
lcd.init();// initialize the LCD2004
lcd.backlight();// turn the backlight ON for the LCD
Serial.begin(9600);// initialize serial monitor with 9600 baud
Serial.println("Robojax MAX6675");
delay(3);// give time to user to read the display at the beginning
}
void loop() {
// basic readout test, just print the current temp
Serial.print("C = ");
Serial.println(thermocouple.readCelsius());
Serial.print("F = ");
Serial.println(thermocouple.readFahrenheit());
lcd.clear();// clear previous values from screen
lcd.setCursor(6,0);// set cursor at character 0, line 1
lcd.print(thermocouple.readCelsius());
lcd.setCursor(12,0);// set cursor at character 9, line 1
lcd.print((char)223);
lcd.setCursor(13,0);// set cursor at character 9, line 1
lcd.print("C");
lcd.setCursor(6,2);// set cursor at character 9, line 1
lcd.print(thermocouple.readFahrenheit()); // print temperature in Fahrenheit
lcd.setCursor(12,2);// set cursor at character 9, line 1
lcd.print((char)223);
lcd.setCursor(13,2);// set cursor at character 9, line 1
lcd.print("F");
delay(500);
}
delay(500);
}
