Code covered by the BSD License  

Highlights from
Servo motors controller

4.5 | 2 ratings Rate this file 38 Downloads (last 30 days) File Size: 9.88 KB File ID: #29895 Version: 1.0
image thumbnail

Servo motors controller



A GUI to control six servo motors.

| Watch this File

File Information

It's a servo controller for six servo motors. It can be used to control a antropomorphic arm with six motors. For a correct execution, it must select the motors following this table:
 #servo - char to use for the motor selection
   1 a
   2 b
   3 c
   4 d
   5 e
   6 f
The microcontroller must use the same char. It uses a serial communication via RS232 protocol.

Required Products Instrument Control Toolbox
MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
22 Mar 2015 Andrea Cirillo

Hi Harris,
I think that a simple Arduino solution like the following one should be work fine! Let me know if you need for further help.

int incomingByte = 0; // for incoming serial data
char selectedMotor;

void setup() {

void loop() {
if (Serial.available() > 0) {
// read the incoming byte:
selectedMotor =;
incomingByte =;

if (selectedMotor == 'a') {
// active first motor
else if (selectedMotor == 'b') {
// active second motor
/* And so on... */

Comment only
16 Mar 2015 Harris Ko

The gui is similar to what i would like to use. The problem i have is what code to write for the arduino. Could you please post a sample of code for the arduino?( i am new to arduino and matlab interaction)

Comment only
13 Nov 2014 Carlos Moran

gracias por esta ayuda es de mucha utilidad

10 Jan 2013 animati

Thanks, for this good serial port code.

Comment only
01 Sep 2011 Andrea Cirillo

Yes. It is a very simple algorithm.

Comment only
01 Sep 2011 Paulo

Paulo (view profile)

is it like this:

PIC microcontroller:
if motorSelection == a
then activate motor1
else if motorSelection == b
then activate motor2
else if motorSelection == f
then activate motor6?


Comment only
31 Aug 2011 Andrea Cirillo

The software needs a simple circuit microcontroller based.

Comment only
31 Aug 2011 Paulo

Paulo (view profile)

how will this work? SERVO to PC? no need for microcontroller?

09 Feb 2011 Bhuvan

Bhuvan (view profile)


Comment only

Contact us