Matlab communication
|
Files |
| file | matlab.c |
| | To communicate with matlab.
|
| file | matlab.h |
| | To communicate with matlab.
|
Detailed Description
This package contains all the ressources you need to communicate with matlab through bluetooth.
To make the communication possible, you have to follow this steps:
- Open matlab and set the default direcories to "...\library\matlab\matlab files\"
- Connect your e-puck to your PC with bluetooth
- Call the matlab function "OpenEpuck('COMX')"; X is the number of the port on which the e-puck is connected.
If you want to send data from matlab you only have to call the matlab function "EpuckSendData(data, dataType)"
- data is the array of value you want to send;
- dataType is a string argument which can be 'int8' to send char or 'int16' to send int;
On the e-puck side, to receive the data, you have to call the appropiate function depending of the data type you will receive. For exemple if matlab send int data, you have to call: e_receive_int_from_matlab(int *data, int array_size).
Now if you want to send data from e-puck to matlab you have to call the function e_send_int_to_matlab(int* data, int array_size) (send int data) on e-puck side and call "EpuckGetData" on matlab side. This function make the data convertion automatically, so call it to receive both of 'char' or 'int' data. - See also:
- Matlab communication
- Author:
- Doc: Jonathan Besuchet
Generated on Fri Feb 29 14:26:55 2008 for e-puck by
1.5.4