Sending Commands from Matlab Gui wirelessly to Audrino

조회 수: 2 (최근 30일)
Josh
Josh 2014년 3월 12일
댓글: Laurent Storrer 2017년 11월 12일
Hello I am working on a project to control a RC car wirelessly using a matlab gui with an Arduino uno and wifishield Im trying to get the gui to set up a connection to the with the arduino. Then from there I hit up on the push button and the car moves forward. I have a wifi web server code on my Arduino Uno but I dont know if im really connecting with matlab. To be honest im lost any help would be appreciated. Heres my code for connecting to my wifi web server on my arduino.
%%setting up the udp connection
remPort=8888;
host='192.168.1.3';
locPort=9055;
u = udp(host,'RemotePort',remPort,'LocalPort',locPort);
fopen(u)
  댓글 수: 13
Walter Roberson
Walter Roberson 2017년 10월 29일
Ahmer Ahmed: Do you mean that you are programming the ESP8266 itself, with its 64 Kb of program space and 96 Kb of data space (if so, then what role is the Arduino playing, other than providing power?) Or do you mean that you are using the ESP8266 for its WiFi stack to connect remotely to the Arduino? Those are very different tasks.
Laurent Storrer
Laurent Storrer 2017년 11월 12일
I think that he's using the wifi stack of the ESP8266 to connect on the Arduino (if not, what is the point of using the Arduino). I am trying that as well and I had some questions. I try to setup a communication between Matlab 2016a and Arduino Due through the ESP8266, following this tutorial:
I use the Simulink setup that Mathworks is providing, but I have 2 problems/questions:
1) In the Hardware Implementation configuration panel of Simulink, after specifying that I use an Arduino Due (I have downloaded the Arduino Support Package) I can't specify that I am using an ESP8266. Does it mean that the ESP8266 is not taken in charge in the package by Matlab anymore?
2) Do I have to program my ESP8266 to act as a server (through C++ code run on the Arduino) before trying to connect it with Matlab, or will Matlab do all the setup automatically? (For the configuration I have the Arduino connected via USB to my laptop).
Thanks in advance for the help!

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Mobile에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by