It's possible to use Sprintf in S-function to convert Double value to Array to be send by Serial Transmit???

1 view (last 30 days)
Hello;
I'm working with the Tiva C launchpad and Embedded coder for Energia, and the Serial Transmit only send unit8 data and Ascii format, so if I'm receiving a value of 123 from a sensor, and i try to send by serial I will receive in the other side a {, because it's the symbol for 123.
I need to create a substitute of the Ascii coder (because doesn't work with code generator. I tried making a C code but when i tried to read the array with coder.ceval I can't import arrays.
So my last option is to make a S-function to make the process of Sprintf, but in the output parameters i can't find the char or string option, so I'm thinking that I will not make with this tool.
Do you have some idea to make that?
Thanks

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!