Can I include the libraries downloaded with arduino support package directly into my IO device builder block
18 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Aravind
2024 年 11 月 26 日 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.
参考
カテゴリ
Help Center および File Exchange で Modeling についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!