Hi everyone,
I'm currently using an Arduino Uno with a I2C LCD hooked up to it. I've browsed through a bunch of the posts and have tried numerous strategies to get my I2C display to display numbers and a string. Anything I output is just giving me whole numbers like 100, 101, 110 etc. I'm not getting any text at all. What I would like it to display on my LCD Screen is "Heart Rate: 79.95"
Here is what I have:
arduino=serial('/dev/tty.usbmodem14101','BaudRate',9600);
fopen(arduino);
heartrate=79.95;
fprintf(arduino,'Heart Rate: %d\n',heartrate);
fclose(arduino);
I've varied fprintf (ex: fprintf(arduino,'%.2f',heartrate)) to just print a decimal number and it also won't do it, I still get whole numbers.
Any ideas?
Best Answer