cancel
Showing results for 
Search instead for 
Did you mean: 

How do I output an Integer over USB?

GTann.1
Associate

I am trying to send some communication from an Nucleo-F412ZG board over USB. I am currently using CDC_Transmit_FS function but this seems to only send char values and I would like to be able to send an uint8_t variable and have it come out as a meaningful set of characters, is there a way to do this with the CDC_Transmit_FS function or do I need to use something else?

1 REPLY 1

You'd need to create the ASCII or human readable forms with sprintf() or itoa() into character strings,and then cast those into (uint8_t *) collections of bytes.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..