Quantcast
Channel: Reprap Forum - Firmware - Marlin
Viewing all articles
Browse latest Browse all 12089

Re: Sending Message to LCD screen

$
0
0
Thanks for the advice, I have tried lcd_setstatus, but have some trouble with set_status.

It works if I just pass in a cstring directly, but I can't get it to work with floats or doubles. Is there a way to print out a float or double with lcd_setstatus? Here's what I have:
int sensorValue = analogRead(MFC_SENSOR);
double voltage = sensorValue * (5.0 / 1023.0);
char message[25] = "Voltage: ";
sprintf(message, "%f", voltage);
lcd_setstatus(PSTR(message));

I really appreciate your help!

Viewing all articles
Browse latest Browse all 12089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>