Ball and Plate with matlab and fuzzy

Hi everyone, I new in this forums and in the Arduino's world.

This is my first project and it is the final degree project.

I would do a Ball and Plate system using Arduino, Matlab and Fuzzy control and a webcam.

The process is very simple:

  • the webcam read the position of the ball and his error in position (velocity)

  • Matlab process the video adquisition and send it to a fuzzy controller. (Fuzzy toolbox of matlab)

  • Fuzzy controller, with his rulemap, define a PWM signal to control the servomotors.

  • The PWM signal is read for the Arduino and send to the motors.

Well, my question is the next:

How I can program the Arduino for read a Matlab signal (the fuzzy output). ? How code I must use?

Sorry for my english, I'm Spanish and sorry if I incomplish any rule of this forum.

Thanks!

How I can program the Arduino for read a Matlab signal (the fuzzy output). ? How code I must use?

Matlab will talk to the Arduino using the serial port, so Serial.available() and Serial.read() will do the trick.

PaulS: Matlab will talk to the Arduino using the serial port, so Serial.available() and Serial.read() will do the trick.

Thanks, later prove them and expose the result :)