Society of Robots - Robot Forum

Software => Software => Topic started by: neo01124 on October 11, 2007, 11:07:41 PM

Title: Controlling Robot through serial port with matlab
Post by: neo01124 on October 11, 2007, 11:07:41 PM
A friend of mine working on Image processing (Matlab) wrote some code to detect the centroid of a red ball and now we want our bot(basically a differential with 2 dc geared motors) to turn using this info.We found out that a parallel port is the best (read easiest) option but laptops dont got no parallel ports.So we decided of using the serial port and thank god for MATLAB help we understood sum of what was written and also understood that on the reciever side we'd have to use a level converter(max 232) and interface it with a uController and generate signals for the motors ,but i am not able to figure out how exactly to send data through serial port with fwrite() function.Basically i wanna kno how to light up an LED with the serial port with matlab!!Thanks already!!