I have a project in which I interface the RTWT library (Simulink) with a PIC micro controller. I want to send commands from Simulink to the controller (i.e. letters such as "A", "B", etc). On the micro controller side, everything is ok.
My question is, which blocks am I supposed to use to send those letters to do something in the controller? Digital output or packet output? Also, how can I do to convert letters to ASCII code?
Use double(str) to convert a string variable 'str' to its ASCII equivalent. For example, drag a Constant block into a model and then enter double('Harris is good boy') as the Value. Note that most Simulink blocks required a fixed-signal signal, so the length of the string should be constant.