Hi Arduino
I'm one of big fan of you.
I'm trying to program arduino with matlab. I saw some movies on YouTube that they could do it.
But I wanna know matlab has any library for arduino.
Tnx for your help and your support.
I saw some movies on YouTube that they could do it.
Matlab can not write code for the Arduino. It can read data from, and send data to, the Arduino. Not the same thing, at all.
To add onto what Paul said, you basically just turn the Arduino into a finite state machine that accepts instructions from Matlab. So you can do things like write HIGH to a digital pin, but it will actually be sending a command from Matlab to an Arduino script that then executes the function wanted.
I'm pretty sure in Simulink you can actually upload code to some Arduinos, but having tried that myself it's honestly a lot more confusing than just using C++ in Arduino IDE, and it also suffers from high latency.
What you should instead use Matlab for is to process data from Arduino after the fact. i.e. if you want to tune a PID, grab the data from Serial Monitor and graph it in Matlab - don't directly try to control the Arduino from Matlab, it's not a great method.