User manual
051 Serial.print(temp_fahrenheit);
052 Serial.println(" °F");
053
054 delay(1000);
055 }
The resistance curve of the NTC is not precisely linear and needs
to be adjusted by a calculation.
001 temp_celsius = (580.0 – ADC_raw) / 10
To receive the output not only in degrees Celsius, the value will
be converted to Fahrenheit and displayed on the LCD.
001 float Grad_to_Fahrenheit(float grad)
002 {
003 return (9.0 / 5.0) * grad + 32;
004 }
As you can see, we can write calculations at once after the
command return and do not need to hand it over to a variable first.
This function calculates the value in degrees Fahrenheit, as used
in the US system based on the degrees Celsius.
In this program, the serial interface is also used and the same
value is output on the LCD and additionally through an
ASCII-string via the UART-interface. When opening the Ar-
duino™-internal terminal program and setting its interface to
9,600 Baud, you will receive the measured values in plain text
in the terminal program.
TEMPERATURE PLOT-
TER WITH
USB-INTERFACE
Let us expand the thermometer with a VB.NET-program and change
the program code so that the plain text output as in the
predecessor program will be replaced by sending only the