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

1 次查看(过去 30 天)
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

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 String 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by