Hey Redding,
From what I gather, you're reading in input from the body suit and processing it with Matlab. You then wish to send out the processed information to a robot of some kind.
One way to communicate with a robot in real time is with serial communication over a serial port (like USB). Matlab is capable of doing serial communication. The computer can calculate which movement it wants and then send different serial information to the robot accordingly. The robot's own microcontrolller then interprets and executes this command. Matlab could send out serial information like this:
Code:
% set up the serial connection:
% This connects your Matlab program with the serial port at COM1,
% for example, you may use a USB cable to connect your robot to the computer
serialOne=serial('COM1', 'BaudRate', 9600); % parameters will probably be different for you
fopen(serialOne);
% Next, determine which command to send to the robot
if(robot turn left)
fprintf(serialOne,'1'); % send the robot a '1' over the serial port
if(robot turn right)
fprintf(serialOne,'2'); % send the robot a '2' over the serial port
% Close the serial port at the end of the program
fclose(serialOne);
code source: http://en.wikibooks.org/wiki/MATLAB_..._A_Serial_Port
The robot then takes this serial data over the serial port, interprets it, and executes the command accordingly. How the robot hooks up to the serial port and reads serial data depends on the robot and microcontroller. I'm not sure what hardware you're using though. If you're looking for recommendations, read about the Arduino board or the Arbotix board (which is based off Arduino). It really depends on what you're doing with it. If you provide some more details, we can help you out.
I should also note you can do this with other programs, in addition to MATLAB. Just look up how they communicate via serial.
Hope this helps,
CyberPenguin
PS: I should note that I'm in no way an expert on this stuff and am still trying to understand it myself. In fact, I asked a similar question on this forum and have had some helpful posts from people much more experienced than I.
Link:
http://forums.trossenrobotics.com/sh...2-via-Keyboard
Bookmarks