Can I include the libraries downloaded with arduino support package directly into my IO device builder block
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Abdussamad Mohammed
am 25 Nov. 2024 um 11:40
Kommentiert: Abdussamad Mohammed
vor etwa 18 Stunden
Hello Mathworks community,
So I wanted to build a custom simulink block to connect my ESP32 to AWS using IO device builder. some libraries I'm going to need are WiFi and WiFiClientSecure; which are libraries usually included with the ESP32 core and don't need external files to be added. and indeed when I navigate into the files of the support package these libraries are there. but I have found no way of including them into my code without copying the files into my custom block directory.
so my question is: is there a way to directly include them in my code?
0 Kommentare
Antworten (1)
Aravind
am 26 Nov. 2024 um 6:48
The core libraries that come with the Arduino Support Package can be directly included in the generated code of the "IO Device Builder" app, so there is no need to manually add or copy these library files into the custom block directory.
In fact, manually adding such libraries can lead to conflicts with the core libraries in the support package, resulting in unexpected behavior. The "IO Device Builder" app is intended for including only external libraries that are not already part of the support package.
Since "WiFi.h" and "WiFiClientSecure.h" are core libraries included in the support package, you can simply use them in the generated ".CPP" file by adding these lines at the top of the file:
#include "WiFi.h"
#include "WiFiClientSecure.h"
I hope this clears up your question.
Siehe auch
Kategorien
Mehr zu Modeling finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!