Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

RCSERVO: Digital Servos together with analogue servos

Based on DMP's Vortex processor / SoC this board is a full computer capable of running a standard Windows and Linux installation on the backpack of your robot.
2 postsPage 1 of 1
2 postsPage 1 of 1

RCSERVO: Digital Servos together with analogue servos

Post by dragonax » Wed Dec 01, 2010 7:56 am

Post by dragonax
Wed Dec 01, 2010 7:56 am

I have both analgue (6) servos and Digital (12) servos in my setup
does anyone know how to use RCSERVO function as it doesn't work for me.

I try
Code: Select all
if (rcservo_SetServos(RCSERVO_USECHANNEL0+..12, RCSERVO_SERVO_DEFAULT)){

 if (rcservo_SetServos(RCSERVO_USECHANNEL3+..18,   RCSERVO_SERVO_NOFB)){

if (rcservo_Initialize(RCSERVO_USECHANNEL0-18){

unsigned long motion[32];

for (int i=0;i<32;i++){
motion[i] =1500;
};

rcservo_EnterPlayMode;
rcservo_SetAction(motion, 2000L)
while (rcservo_PlayAction()!= RCSERVO_PLAYEND){
}

}
}
I have both analgue (6) servos and Digital (12) servos in my setup
does anyone know how to use RCSERVO function as it doesn't work for me.

I try
Code: Select all
if (rcservo_SetServos(RCSERVO_USECHANNEL0+..12, RCSERVO_SERVO_DEFAULT)){

 if (rcservo_SetServos(RCSERVO_USECHANNEL3+..18,   RCSERVO_SERVO_NOFB)){

if (rcservo_Initialize(RCSERVO_USECHANNEL0-18){

unsigned long motion[32];

for (int i=0;i<32;i++){
motion[i] =1500;
};

rcservo_EnterPlayMode;
rcservo_SetAction(motion, 2000L)
while (rcservo_PlayAction()!= RCSERVO_PLAYEND){
}

}
}
dragonax
Savvy Roboteer
Savvy Roboteer
Posts: 35
Joined: Sat Sep 04, 2010 7:46 pm

Post by dragonax » Wed Dec 01, 2010 1:55 pm

Post by dragonax
Wed Dec 01, 2010 1:55 pm

Got it working

if anyone ever have same problem this is how i solved it

First set servos one by one using rcservo_SetServo NOT rcservo_SetServos

Code: Select all
rcservo_SetServo(0,   RCSERVO_SERVO_NOFB);
rcservo_SetServo(1,   RCSERVO_SERVO_NOFB);
rcservo_SetServo(2,   RCSERVO_SERVO_DEFAULT);
...
..
rcservo_SetServo(18,   RCSERVO_SERVO_DEFAULT);


Then use
Code: Select all
rcservo_EnterPlayMode_NOFB(motion);
Got it working

if anyone ever have same problem this is how i solved it

First set servos one by one using rcservo_SetServo NOT rcservo_SetServos

Code: Select all
rcservo_SetServo(0,   RCSERVO_SERVO_NOFB);
rcservo_SetServo(1,   RCSERVO_SERVO_NOFB);
rcservo_SetServo(2,   RCSERVO_SERVO_DEFAULT);
...
..
rcservo_SetServo(18,   RCSERVO_SERVO_DEFAULT);


Then use
Code: Select all
rcservo_EnterPlayMode_NOFB(motion);
dragonax
Savvy Roboteer
Savvy Roboteer
Posts: 35
Joined: Sat Sep 04, 2010 7:46 pm


2 postsPage 1 of 1
2 postsPage 1 of 1