フィルターのクリア

How to transmit several float from simulink to arduino mega

4 ビュー (過去 30 日間)
pascal
pascal 2019 年 2 月 12 日
コメント済み: pascal 2020 年 9 月 6 日
good morning
i am a french teacher and i would like to know how to send 3 float from simulink to arduino.
I want to use the transmit block from simulink suppport package for arduino hardware
may i use single format or array of bytes?
I tell you that i understood the opposite passage that uses the union structure in arduino code to send floats from arduino to simulink.
In fact i would like to know the arduino code and the blocks to put in place in simulink and their setting.
thanks a lot for your anwers

回答 (1 件)

Munish Raj
Munish Raj 2019 年 2 月 25 日
The data can the sent to arduino from simulink as an array
This can be done using the Tapped delay block in Simulink.
When this is done, the serial port will send the subsequent data bytes continuousy.
The Read protocols on arduino will treat these as unique values.
  1 件のコメント
pascal
pascal 2020 年 9 月 6 日
Hello and thank you for answering me.
I still don't understand the use of "tapped block".
I am attaching a screenshot to receive 2 floats from arduino to simulink. I would like to know the scheme in simulink to send 2 float to arduino from simulink. I also attach a screenshot of the arduino code to receive 2 floats from matlab.
Thanks in advance for my students
Best regards

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDevice Driver Blocks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by