Hi. I am trying to use this package with an Arduino Uno board that's connected to a motor driver to drive a motor to my desired position and speed (later with implementing a PID controller).
I was wondering how I can use this package with the motor real time. Or how I can design the PID controller in Simulink for this application.
There are two options
1) One could use for iterator block or something that can read bytes one by one and then buffer them as per application needs in the model
2) or on the contrary create a custom block that uses the Serial.readBytes function from the arduino standard library. http://arduino.cc/en/Serial/ReadBytes
For creating a Custom driver block one could follow the guide published at
Hope this helps,