How to send data to Arduino MKR1010 via wifi In Simulink

2 Ansichten (letzte 30 Tage)
John Barreira
John Barreira am 4 Aug. 2019
Kommentiert: Abhisek Pradhan am 9 Aug. 2019
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

Antworten (1)

Abhisek Pradhan
Abhisek Pradhan am 7 Aug. 2019
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 Kommentare
John Barreira
John Barreira am 7 Aug. 2019
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 am 9 Aug. 2019
Try using UDP Send block in the DSP Toolbox.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by