by crane » Thu Dec 10, 2009 10:35 am
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.