How to send data to Arduino MKR1010 via wifi In Simulink

2 ビュー (過去 30 日間)
John Barreira
John Barreira 2019 年 8 月 4 日
コメント済み: Abhisek Pradhan 2019 年 8 月 9 日
I'm working on a project where I'm using the input from a USB gamepad to wirelessly control a brushless DC motor. I'm currently able to control the motor with eveything connected to my computer (not wirelessly). How can I use the wifi blocks from the Arduino hardware library in Simulink to send the data from my gamepad to the Arduino so that it generates a PWM signal based on the value coming from the gamepad? Thank you!Capture1.PNG

回答 (1 件)

Abhisek Pradhan
Abhisek Pradhan 2019 年 8 月 7 日
WiFi UDP Send and WiFi UDP Receive Blocks in Simulink Support Package for Arduino Hardware ( Supported on MKR 1010 ) can be used to send and receive data on wireless networks.
Data is sent from the port number specified in the Local IP Port and received by host with specified Remote IP address and the Remote IP Port.
  2 件のコメント
John Barreira
John Barreira 2019 年 8 月 7 日
Thanks! So I would use the WiFi UDP Receive block in the Simulink Support Package for Arduino Hardware to receive the data coming from my pc. Do I use the UDP Send block in the DSP Toolbox or the Simulink Support Package for Arduino Hardware to send the data to my Arduino?
Abhisek Pradhan
Abhisek Pradhan 2019 年 8 月 9 日
Try using UDP Send block in the DSP Toolbox.

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

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by