My search wasn't that successful, so I put a new topic for this issue.
A couple of weeks ago, I managed to connect my Arduino Duemilanove (atmega168) with Matlab R2011a (on Windows). For doing so, I installed ArduinoIO and uploaded the adiosrv.pde code on my Arduino.
I then decided to test the serial communication between Arduino and Matlab and put a sinus voltage 0-2V on a pin to read its output.
On Matlab, I made a new model in Simulink and put a Scope at the output of a AnalogRead block (and somewhere else, I put the Arduino Setup box correctly configured).
The result : I record a quite stairs looking signal with about 60 steps a second. But I read that the communication can be a lot faster. Do you know where is the issue ?
My aim : recording signal whith a frequency up to 100 Hz.
Can you post the Arduino code you have?
The ADC takes less than a millisecond,
if you send the RAW measurements as 2 bytes that will take @115200 about 2 milliseconds (let the PC do the conversion to volts)
So a freq. of about 500Hz should be possible.
Furthermore the Arduino can send at higher speeds (but not to the Serial Monitor of the IDE)
I have used with succesfully 230400 345600 and 500000 baud which makes about 2Khz samples possible.
Don't know which speeds are supported by MatLab.
If you want really fast IO you might consider using a teensy2.0 or so; IIRC it can go upto 1MByte /second.
I think it has to be possible to send at a high frequency but I don't really understand why it takes so long with this code.
By the way, if I am not clear, don't hesitate to ask me what I mean because I am French and can make some mistakes…
Ok. I will try and see if it is possible to modify the cadence of request from Matlab, or make a code which don't wait for a request. By the way, do you know how I could do multiplexing with Arduino to send datas from several pins through serial port ? And how to separate the signals when they arrive on the computer ?
I am going to try it next Tuesday, when I get back my Arduino (lent to a colleague). If I find how to demux signals on Matlab, I will share the solution.