Hi there.
Can anyone please point me to a particular 7-segment LED display (a driver IC) and a library for that which would be able to display properly digits with a decimal point obtained from a serial port data? I've tried all the existing libraries for both MAX7219 and 74HC595 shift register displays but none of them is capable to depict decimal fractions at all. What they do is they just show the integer part of the value read and that's it. There is no such a problem with LCD character displays though.
Most 7-segment displays can light up any combination of decimal points but most libraries don't make it as easy as sending a 'float' to a function. You may have to modify or bypass parts of whatever library drives your display.
/*!
@brief Print double-precision float value to 7-segment display.
@param n Numeric value.
@param digits Fractional-part digits.
*/
void print(double n, int digits = 2);
Try this tutorial:
Write sketch to show the temperature signal of the LM35 sensor at 2-sec interval on the display unit of the Fig-1 using Library Functions/Methods. The prototypes and meanings of the methods could be found in the attached Library file (SevSeg-master.zip). Extract the zip file and then get the syntax rules and meaning of the methods. (You may take take help of the given sketch).
Figure-1: