Long Integer to ASCII Numbers Conversion

Status
Not open for further replies.

tlb

Well-known member
I'm starting to play with my Teensy 2.0 and have USB serial transmitting. For my project, I need to send back ASCII numbers for a 24 bit binary value. Before I write the code myself, I was wondering if anyone had a piece of code I could "leverage". Hopefully written relatively efficiently for the AVR.

Thanks

TLB
 
Well there is the standard Stream.print and Stream.println that convert a long variable and write it to the USB monitor (println also prints a newline after printing out the integer). Print/println have different functions, that will do the printing based on the type of the argument (String, char, int, long int, unsigned long, double, etc.).
 
Status
Not open for further replies.
Back
Top