I'm working on a control problem, using an Arduino Mega2560 as a real time controller and Matlab as a supervisor. Matlab provides the coefficients for the control law, which it calculates from results returned by Arduino.
The Arduino is working flat out in a control loop, but sending results to Matlab only every 10s or so. It then waits for a ms or two until it receives a new string of integer numbers to use in its control.
I've got a prototype working, but debugging has been difficult because I cannot see how to use the serial monitor when the COM port is tied up for communication with Matlab.
Has anybody any suggestions on how this can be overcome? Is it possible either to use two COM ports at the same time, or to use the one for both purposes?