Importing Arduino IDE Code into Basic_Custom_Code_Block in Simulink
Added by Masoud Vaezi 8 months ago
I can read my gps sensor data using Arduino IDE and the written code by the sensor manufacturer.
I need to read the data in Simulink in external mode interactively.
I have done this on Arduino Mega board using Arduino_Simulink_Support_Package and S-Function and it works properly.
Now that I have switched to ESP32 S3, I am using Waijung 2 to do the same thing in Simulink using Basic_Custom_Code.
I am trying to import the code into "Basic_Custom_Code" block as Custom C Code but I get so many errors as " unknown type name 'class'". and as far as I researched, it seems like the error is because of some defined C++ classes in header files that is used by the example code and this is supposed to be a c code.
When I was using Arduino mega package, the toolchain could figure out the basic header files such as "Arduino.h" and etc. But Waijung package can not reach to those header files needed for communication. I added all the header files manually and yet it does not work.
Has anyone done such thing before? I mean using Arduino IDE example codes for a module and importing them into Waijung Basic_Custom_Code block?
I could not find any example or resources about this.
Attached is just a portion of the longer error.
RE: Importing Arduino IDE Code into Basic_Custom_Code_Block in Simulink - Added by Parth Maheshwari (พาร์ท) 8 months ago
Hello Masoud Vaezi,
Thank you for showing an interest in our blockset.
Would you mind sending us your Simulink model and attach the entire error as a .txt file too? We shall take a look.