I am trying to develop a control system using Simulink's model-based design approach, and I need to use the data from an accelerometer. Ultimately this control system will be downloaded onto/implemented on an Arduino Mega microcontroller.
My question: How can I, in Simulink, recieve the accelerometer data? I have found out that the accelerometer uses I2C communication. I notice that there's a "Serial recieve" block in the Simulink Arduino support package, but I cannot figure out how to make it work.
This video shows exactly what I want to be able to do:
Any help would be GREATLY appreciated!