I'm sure this is a dumb question, but I can't seem to find an answer anywhere. I've been messing around with the various lcd libraries and I am trying to print an analog reading to the lcd. Using lcd.printIn() I just get an error 'invalid conversion from int to char'. So how do I 'convert' an int to a string? Thanks, chris
first, include the right header file:
Then, in your code, define a buffer large enough to store the generated number, e.g.
In your code, convert the integer value, the ASCII characters end up in num:
itoa(value, &num, 10); // convert to decimal
For itoa() documentation, look here: