Sending Commands from Matlab Gui wirelessly to Audrino

2 views (last 30 days)
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 Comments
Walter Roberson
Walter Roberson on 29 Oct 2017
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 on 12 Nov 2017
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!

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Mobile in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!