Well the value 0-1023 is then put into a formula, so a few calculations are done. Could that not yeild a decimal?
Here is parts of my code:
#include <LiquidCrystal.h>
int sensor = 0; //Sets the sensor input to pin 0
int boost = 0; //sets the boost to 0
int sensorval = 0; //sets sensor value to 0
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //sets the pins for the LCDvoid loop() {
sensorval = analogRead(sensor); //Polls the sensor for data
boost = ((sensorval*.0049)/5.1+.04/.00369 *.14503774); //converts sensorvallcd.setCursor(7,0); //sets the cursor position
lcd.print(boost); //prints boost data
lcd.setCursor(11,1);