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

Can't get the servo to work (Linux)

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.
5 postsPage 1 of 1
5 postsPage 1 of 1

Can't get the servo to work (Linux)

Post by crane » Thu Dec 10, 2009 10:35 am

Post by crane
Thu Dec 10, 2009 10:35 am

I am running ubuntu 9.10 with 2.6.29.1-vortex86dx kernel

I am trying to test rc servo but looks like the initialization fails.

I have tried the simplest code.

servo.cpp

Code: Select all
#include <stdio>
#include <roboard>

int main(void) {
   if (rcservo_Initialize(RCSERVO_USECHANNEL0)) {
      printf("Initialized. Channel 0\n");
      rcservo_Close();
   } else {
      printf("Initialization failed\n");
   }

   return 0;
}

(some how, this message board removed the ".h" from my includes. In my actual code, it is <stdio> and <roboard>. I don't get any error message while compiling or linking.>


$ gcc -c servo.cpp -I./libsrc
$ gcc -o servo servo.o -L. -lRBIO -lstc++
$ ./servo
Initialization failed

I tried different channels and but all of them do not work. I have also tried all the possible bios settings...

Any help would be greatly appreciated.
I am running ubuntu 9.10 with 2.6.29.1-vortex86dx kernel

I am trying to test rc servo but looks like the initialization fails.

I have tried the simplest code.

servo.cpp

Code: Select all
#include <stdio>
#include <roboard>

int main(void) {
   if (rcservo_Initialize(RCSERVO_USECHANNEL0)) {
      printf("Initialized. Channel 0\n");
      rcservo_Close();
   } else {
      printf("Initialization failed\n");
   }

   return 0;
}

(some how, this message board removed the ".h" from my includes. In my actual code, it is <stdio> and <roboard>. I don't get any error message while compiling or linking.>


$ gcc -c servo.cpp -I./libsrc
$ gcc -o servo servo.o -L. -lRBIO -lstc++
$ ./servo
Initialization failed

I tried different channels and but all of them do not work. I have also tried all the possible bios settings...

Any help would be greatly appreciated.
crane
Robot Builder
Robot Builder
Posts: 8
Joined: Thu Dec 10, 2009 10:21 am

Post by crane » Fri Dec 11, 2009 12:24 am

Post by crane
Fri Dec 11, 2009 12:24 am

I also measured the voltage at the 'vcc' pin of the servo pin, and it read exactly same as the power supply voltage. In my case, I was using 12V. Is this normal?
I also measured the voltage at the 'vcc' pin of the servo pin, and it read exactly same as the power supply voltage. In my case, I was using 12V. Is this normal?
crane
Robot Builder
Robot Builder
Posts: 8
Joined: Thu Dec 10, 2009 10:21 am

Post by roboard » Fri Dec 11, 2009 1:04 pm

Post by roboard
Fri Dec 11, 2009 1:04 pm

Please ensure you log in as a root that can run RoBoIO and try again.
Please ensure you log in as a root that can run RoBoIO and try again.
roboard
Savvy Roboteer
Savvy Roboteer
Posts: 302
Joined: Fri Jul 03, 2009 4:44 am

Post by crane » Fri Dec 11, 2009 9:49 pm

Post by crane
Fri Dec 11, 2009 9:49 pm

Thank you very much!

Using sudo, I was able to initialize the servo. I did not have enough time to test the RoBoIO this morning. I will do more test when I get home this afternoon. By the way, was this root privilege requirement documented somewhere?

One more question. To use the servo, should I use 6V power supply?
Thank you very much!

Using sudo, I was able to initialize the servo. I did not have enough time to test the RoBoIO this morning. I will do more test when I get home this afternoon. By the way, was this root privilege requirement documented somewhere?

One more question. To use the servo, should I use 6V power supply?
crane
Robot Builder
Robot Builder
Posts: 8
Joined: Thu Dec 10, 2009 10:21 am

Post by roboard » Tue Dec 15, 2009 11:26 am

Post by roboard
Tue Dec 15, 2009 11:26 am

HI
1.Yes,you can run all RoBoIO functions as a root.
2.That is normal about the same voltage.Because the power line on RoBoard is connected to servo 'Vxx' pin.
3.The voltage of power supply should be based on the required voltage of servo that you used.If it is 6V,then the voltage of power supply is 6V.(NOTE:Do not exceed the voltage range of RoBoard.)
HI
1.Yes,you can run all RoBoIO functions as a root.
2.That is normal about the same voltage.Because the power line on RoBoard is connected to servo 'Vxx' pin.
3.The voltage of power supply should be based on the required voltage of servo that you used.If it is 6V,then the voltage of power supply is 6V.(NOTE:Do not exceed the voltage range of RoBoard.)
roboard
Savvy Roboteer
Savvy Roboteer
Posts: 302
Joined: Fri Jul 03, 2009 4:44 am


5 postsPage 1 of 1
5 postsPage 1 of 1