How to communicate from Matlab/Simulink to Arduino Due by Wifi using a ESP8266 wifi chip
17 次查看(过去 30 天)
显示 更早的评论
I try to setup a communication between Matlab 2016a/Simulink and Arduino Due through wifi with an ESP8266 wifi chip, 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 (Simulation > Model Configuration Parameters > Hardware Implementation > "specify arduino model in hardware board field" > Target Hardware Ressources > Wifi shield properties), 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? Does it mean that the ESP8266 is not detected?
I have:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170085/image.jpeg)
and following the tutorial I should have:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170087/image.jpeg)
2) Do I have to program my ESP8266 to act as a server and assign an IP adress to it(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 个评论
回答(2 个)
Pradeep KS
2017-11-24
Hi Laurent, ESP8266 WiFi board is supported as a shield in Simulink Arduino Support package starting from R2017b release. Its not supported in R2016a release as you mentioned.
To use ESP8266 with Simulink Arduino support package, AT firmware should be running in the ESP8266 board. Arduino and ESP8266 are interfaced using Serial communication.
Please refer to below link on interfacing ESP8266 WiFi board with Arduino hardware. https://www.mathworks.com/help/supportpkg/arduino/ug/connect-esp8266-to-arduino-hardware.html
-Pradeep
2 个评论
Prathap moola
2018-11-27
编辑:Prathap moola
2018-11-27
hi guys,
I too have the same issue... how to fix it... how to assign ip adress to esp8266.
if any one can help me!
thank you.
Shreya Bharti
2021-5-7
Hello, I am trying to calculate distance through ultrasonic sensor which is interfaced with esp8266 and the complete system is working fine when running code on Arduino ide.But I want to display and plot distances using MATLAB code.Is it possible in any way?? I have tried lot of things but alone with esp8266 and sensor it's not working. Please help.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Modeling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!