On Oct 4, 2009, at 1:41 PM, markus järve wrote:

Hello.

I am having problem due to my limited knowledge of C.

I have function readADC wich wil return value in integrer.
Sadly the function LcdStr (wich is from Fandi Gunawan library for nokia 3310 lcd) accepts only char array pointers.

So, i need to make int 123 into char *array[3] = 1, 2, 3

I have been stuck on it for a day and have ran out of ideas. Maybe someone could point me to the right direction or help me figure it out.

Don't you need to use integer -> ascii conversion?
Like

char array[4];
snprintf (array, sizeof(array), "%d", readADC());

I set array to be 4 elements length, because snprintf will put terminating zero in the last byte, but that shouldn't matter for LcdStr, If it accepts char*.

Cheers,
Piotr

_______________________________________________
AVR-chat mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/avr-chat

Reply via email to