hi I just started working on a project that should have an LCD, so I bought a 1602 that worked fine with all the trivial "hello world" kind of sketches but when I tested it to show the reading of a voltage coming to an analog input from a photoresistor voltage divider (after mapping the reading from 0-1000 to 0-100) it works good from 100 and down to 10 good. The funny thing is when it displays something lower than 10. If the number that I see in the serial monitor is for example 6.7, the LCD gives me 67!!! I defined the analog input as integer (because it should be an integer between 0 and 1023) and then used the main instruction lcd.print (the same integer that was read) and at the same time sent that integer to the serial monitor which was fine.
Is it that I had to declare the reading of the analog input as float? which doesn't make sense, or is it that probably one of the pins on my LCD is not soldered right? Did anybody have a similar issue?
examples: 96 >> 96 74 >> 74 12 >> 12 8.5 >> 85!! 4.2 >> 42!!