I am running a Hardware in the Loop test with Simulink and would like to control Arduinos, Raspberry Pis, as well as recieve information from I2C devices. I would like for my personal computer to run the simulation as it is large and computationally intensive, however I would like to communicate Simulink values to the mentioned hardware. I am aware that there are Arduino and Raspberry Pi support software, however I believe that they only allow the Hardware to run the models, and do not seem to be able to let the hardware recieve data. I am also aware that the Real Time add-on exists, but the documentation only deals with the Speedgoat software, and I am unsure of whether it would work with other hardware. There is also the Digital Output blocks and Serial Send blocks from the Data Acquisition and HDL Coder packages, however I am unsure if they will connect to the Arduino or Raspberry Pi.
I would like to know what is my best option to have my computer run the simulation and have it export the data in real time to hardware, and also for the hardware to give data in real time for the simulation to use.