Sending Commands from Matlab Gui wirelessly to Audrino
Show older comments
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
on 12 Mar 2014
I am not going to try to read that question until you fix the formatting.
Josh
on 12 Mar 2014
jhomar espanol
on 22 Aug 2017
is this possible? what is the answer.. i want to make home automation system that can be controlled by GUI at the same time with android phone could it be possible?
Walter Roberson
on 22 Aug 2017
jhomar espanol:
MATLAB Compiler cannot be used to create code on Android, and MATLAB Coder does not have any special information about Android.
The easiest approach is to use Simulink blocks to create the program, and tell Simulink to target Android. The resulting program can be run "stand-alone" on Android. There are Simulink TCP/IP blocks.
jhomar espanol
on 23 Aug 2017
what i mean can i used Bluetooth module to send command in matlab while using GUI.. my project is home automation using Gui. and i want to add ons
usama khan
on 21 Oct 2017
how to interface esp8266 with matlab GUI and laptop's wifi for home automation. please help
Walter Roberson
on 21 Oct 2017
If the esp8266 will be on Arduino then see https://github.com/esp8266/Arduino and https://learn.sparkfun.com/tutorials/esp8266-thing-hookup-guide/installing-the-esp8266-arduino-addon
usama khan
on 25 Oct 2017
do anyone have any idea how can i interface my esp8266 wit GUI of matlab ?
Walter Roberson
on 25 Oct 2017
usama khan: what will the esp8266 be connected to?
Ahmer Ahmed
on 29 Oct 2017
I have a ESP8266 hooked up with arduino on the other side. I have made that ESP8266 a server. Now I want my MATLAB GUI to connect to that ESP8266 so that I may be able to control appliances from just buttons on GUI.
Is it possible? If yes, then how? Explain briefly the steps or refer to any link? Thanks in advance.
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
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!
Answers (0)
Categories
Find more on Arduino Hardware 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!