We've some method to run the MatLab code in esp8266 microcontroller. We can manipulate Arduino pins using Simulink in MatLab.

Can we do the same with an esp32 microcontroller as their code can be executed in Arduino IDE?

In Arduino, we are only able to execute Simulink or its own code at a time. Will I have the same problem here with NodeMCU ESP32-WROOM-32D?

Datasheet for the above mentioned microcontroller

2 Answers 2


Yes you can use esp32 microcontroller with matlab as long as you can use esp8266 with matlab code using same method.
Both esp8266 and esp32 are from the same family of microcontrollers and can be coded with esplorer(Lua) or Arduino IDE(c) etc. Yes, they can be coded in several ways. ESP32 is infact successor of ESP8266 with faster wifi and added bluetooth functionality.

So to conclude, You can use the same method to program ESP8266 in MATLAB to program ESP32


Waijung 2 for ESP32 is what you need exactly.

Waijung 2 for ESP32 is an Embedded Coder Target specifically for ESP32 microcontroller family.

Not only it can generate C code from your Matlab and Simulink blocks, it also supports advanced features such as Wifi External Mode simulation, allowing you to tune parameters and monitor signals from connected ESP32 hardware in real time, and much more. You can learn and take the full benefits of Model Based Design using affordable, popular, and powerful hardware.

  • 1
    Welcome to Internet of Things! Please take the tour and visit the helpcenter to see how things work here. Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Please clearly disclose your affiliation with this project (if there is any).
    – Ghanima
    Feb 25, 2022 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.