I am currently using an arduino with the motorshield v2 to drive a few stepper motors for my 3d printer. when I boot up matlab, I usually start by programming the arduino which completes successfully, I test the connection which also is successful. however, when I run my code I get this error message and cant figure out what could be causing it. I have tried redownloading the arduino addon, and clearing the object in the workspace but cant figure it out. sometimes it will persist for hours before I can get my code to run. I am even able to program successfully using the Arduino IDE, meaning i dont believe it is hardware related. Ive atatched screenshots
hoping someone can help!