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

libavr/libbioloid C library for CM5 released!

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
289 postsPage 10 of 201 ... 7, 8, 9, 10, 11, 12, 13 ... 20
289 postsPage 10 of 201 ... 7, 8, 9, 10, 11, 12, 13 ... 20

Post by shyu1 » Wed Jun 24, 2009 8:39 pm

Post by shyu1
Wed Jun 24, 2009 8:39 pm

hey i'm an undergrad working on the bioloids in a lab. i'm having trouble running the example.c stuff from the first page of this topic.

i downloaded everything to the best of my knowledge. However, in the example directory, when i type make i get an error that trig tables can't be found.

following the advice given, i tried to use a manual compile with the gcc -o command however, i still got an error saying that there is no such file or folder as trig_tables.c.

i'm using cygwin on a windows machine.

any help would be greatly appreciated. i only have a year or so of experience in C and linux so i apologize for any stupid mistakes i make.

thanks.
hey i'm an undergrad working on the bioloids in a lab. i'm having trouble running the example.c stuff from the first page of this topic.

i downloaded everything to the best of my knowledge. However, in the example directory, when i type make i get an error that trig tables can't be found.

following the advice given, i tried to use a manual compile with the gcc -o command however, i still got an error saying that there is no such file or folder as trig_tables.c.

i'm using cygwin on a windows machine.

any help would be greatly appreciated. i only have a year or so of experience in C and linux so i apologize for any stupid mistakes i make.

thanks.
shyu1
Newbie
Newbie
Posts: 6
Joined: Wed Jun 24, 2009 8:32 pm

Post by RandomMatt » Wed Jun 24, 2009 8:59 pm

Post by RandomMatt
Wed Jun 24, 2009 8:59 pm

shyu1 wrote:i'm using cygwin on a windows machine.

any help would be greatly appreciated. i only have a year or so of experience in C and linux so i apologize for any stupid mistakes i make.


libbioloid/bioloid/make_trig_tables.c is the source code for a program - when you run that program its output should be piped to trig_tables.c.

--

I haven't tested the code against cygwin - only mingw, linux and os/x... so I'm just guessing. I think that you don't have a working gcc - what happens if you run gcc -v?

Assuming that gcc does work - you could try compiling make_trig_tables.c by hand:
(in libbioliod/bioloid)
gcc -o make_trig_tables.exe make_trig_tables.c

and then generating trig_tables.c
(in libbioliod/bioloid)
./make_trig_tables.exe > trig_tables.c

--

To be honest, once avr-gcc and gcc both work the makefile should do it all for you...

It is possible that you want to run, say, icc instead of gcc - if this is the case you'll need to edit the CC= line of common.mk
shyu1 wrote:i'm using cygwin on a windows machine.

any help would be greatly appreciated. i only have a year or so of experience in C and linux so i apologize for any stupid mistakes i make.


libbioloid/bioloid/make_trig_tables.c is the source code for a program - when you run that program its output should be piped to trig_tables.c.

--

I haven't tested the code against cygwin - only mingw, linux and os/x... so I'm just guessing. I think that you don't have a working gcc - what happens if you run gcc -v?

Assuming that gcc does work - you could try compiling make_trig_tables.c by hand:
(in libbioliod/bioloid)
gcc -o make_trig_tables.exe make_trig_tables.c

and then generating trig_tables.c
(in libbioliod/bioloid)
./make_trig_tables.exe > trig_tables.c

--

To be honest, once avr-gcc and gcc both work the makefile should do it all for you...

It is possible that you want to run, say, icc instead of gcc - if this is the case you'll need to edit the CC= line of common.mk
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by RandomMatt » Wed Jun 24, 2009 9:43 pm

Post by RandomMatt
Wed Jun 24, 2009 9:43 pm

RandomMatt wrote:Just have a look in supervisor.c :wink: - adding -DNO_SUPERVISOR to your CFLAGS_AVR will do it. It will also remove the auto locking of servos - if you need that (and I think that you probably want it) - add dx_initrobot(&robot); to supervisor_init(): line 20ish.


Only an idiot would think that the above is sensible (slaps face).

I've just updated libbioloid (r1232 or higher) so that...
defining NO_SUPERVISOR will initialise the robot (but won't have the supervisor menu)
defining NO_SUPERVISOR and NO_SUPERVISOR_INITROBOT does neither.

--

I'd still suggest experimenting with supervisor_init() to see if the problem can be fixed easily - if it can, then we can have a fully working supervisor on every bioloid!
RandomMatt wrote:Just have a look in supervisor.c :wink: - adding -DNO_SUPERVISOR to your CFLAGS_AVR will do it. It will also remove the auto locking of servos - if you need that (and I think that you probably want it) - add dx_initrobot(&robot); to supervisor_init(): line 20ish.


Only an idiot would think that the above is sensible (slaps face).

I've just updated libbioloid (r1232 or higher) so that...
defining NO_SUPERVISOR will initialise the robot (but won't have the supervisor menu)
defining NO_SUPERVISOR and NO_SUPERVISOR_INITROBOT does neither.

--

I'd still suggest experimenting with supervisor_init() to see if the problem can be fixed easily - if it can, then we can have a fully working supervisor on every bioloid!
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by buhochileno » Thu Jun 25, 2009 12:43 am

Post by buhochileno
Thu Jun 25, 2009 12:43 am

shyu1 wrote:hey i'm an undergrad working on the bioloids in a lab. i'm having trouble running the example.c stuff from the first page of this topic.

i downloaded everything to the best of my knowledge. However, in the example directory, when i type make i get an error that trig tables can't be found.

following the advice given, i tried to use a manual compile with the gcc -o command however, i still got an error saying that there is no such file or folder as trig_tables.c.

i'm using cygwin on a windows machine.

any help would be greatly appreciated. i only have a year or so of experience in C and linux so i apologize for any stupid mistakes i make.

thanks.


do you unpack libbiloid, libavr and libtool at the same folder?, it was my sad case :-S
shyu1 wrote:hey i'm an undergrad working on the bioloids in a lab. i'm having trouble running the example.c stuff from the first page of this topic.

i downloaded everything to the best of my knowledge. However, in the example directory, when i type make i get an error that trig tables can't be found.

following the advice given, i tried to use a manual compile with the gcc -o command however, i still got an error saying that there is no such file or folder as trig_tables.c.

i'm using cygwin on a windows machine.

any help would be greatly appreciated. i only have a year or so of experience in C and linux so i apologize for any stupid mistakes i make.

thanks.


do you unpack libbiloid, libavr and libtool at the same folder?, it was my sad case :-S
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by buhochileno » Thu Jun 25, 2009 12:54 am

Post by buhochileno
Thu Jun 25, 2009 12:54 am

RandomMatt wrote:
buhochileno wrote:ok man, it was just a question...


True... and there is no harm in asking :lol:

When I decided to publish libbioloid, I did look at how to allow access to a repository - and it seems that the version control boys have not solved this particular problem (*).

* the problem is having some files that are private in a public repository.

--

You can always use wget or curl to get the tgz - in which case you'll only have a problem when I remove a file.


Sure no prob,

as a diferent question (most as asking for sugestions..)

doing something like (going pseudo here):
s.servo[0].position =0;
dx_set_stance(&s);
s.servo[0].position =100;
dx_set_stance(&s);
s.servo[0].position =0;
dx_set_stance(&s);

is not going to move the servo, I mean the dx_set_instance don't block the execution of next code meanwhile the motors is moving ..any sugestion about how to check if the motor arrive to certain position until do the next move?, a simple loop checking position until it reach the desired value?

and..by the way, what is the C standard used by the avr?, I mean I probably can't do a "fork" or pthread, so what are the boundries?

thanks

Mauricio
RandomMatt wrote:
buhochileno wrote:ok man, it was just a question...


True... and there is no harm in asking :lol:

When I decided to publish libbioloid, I did look at how to allow access to a repository - and it seems that the version control boys have not solved this particular problem (*).

* the problem is having some files that are private in a public repository.

--

You can always use wget or curl to get the tgz - in which case you'll only have a problem when I remove a file.


Sure no prob,

as a diferent question (most as asking for sugestions..)

doing something like (going pseudo here):
s.servo[0].position =0;
dx_set_stance(&s);
s.servo[0].position =100;
dx_set_stance(&s);
s.servo[0].position =0;
dx_set_stance(&s);

is not going to move the servo, I mean the dx_set_instance don't block the execution of next code meanwhile the motors is moving ..any sugestion about how to check if the motor arrive to certain position until do the next move?, a simple loop checking position until it reach the desired value?

and..by the way, what is the C standard used by the avr?, I mean I probably can't do a "fork" or pthread, so what are the boundries?

thanks

Mauricio
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by StuartL » Thu Jun 25, 2009 6:43 am

Post by StuartL
Thu Jun 25, 2009 6:43 am

buhochileno wrote:and..by the way, what is the C standard used by the avr?, I mean I probably can't do a "fork" or pthread, so what are the boundries?


There are NO standard libraries in libbioloid. There's no implementation of fork(), select(), fopen() etc. Some of these could be implemented if you could think of a practical use but the AVR only runs at 16MHz and your idea of modern multitasking OSs will have to take a twenty year regression if you want to start multi-tasking :D

The most effective (or maybe easiest) way to use libbioloid is to write a simple linear programme that waits when it needs to wait (by looping etc) and sends commands when it needs to send commands. The interrupt handlers inside libbioloid will handle all the serial comms, retransmits, timers etc.

You could do more and implement your own timers and interrupts but you MUST be careful of interrupt priorities. The bus code is very time sensitive as you don't get many cycles to read incoming bytes by the time the interrupt overhead occurs.
buhochileno wrote:and..by the way, what is the C standard used by the avr?, I mean I probably can't do a "fork" or pthread, so what are the boundries?


There are NO standard libraries in libbioloid. There's no implementation of fork(), select(), fopen() etc. Some of these could be implemented if you could think of a practical use but the AVR only runs at 16MHz and your idea of modern multitasking OSs will have to take a twenty year regression if you want to start multi-tasking :D

The most effective (or maybe easiest) way to use libbioloid is to write a simple linear programme that waits when it needs to wait (by looping etc) and sends commands when it needs to send commands. The interrupt handlers inside libbioloid will handle all the serial comms, retransmits, timers etc.

You could do more and implement your own timers and interrupts but you MUST be careful of interrupt priorities. The bus code is very time sensitive as you don't get many cycles to read incoming bytes by the time the interrupt overhead occurs.
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK

Post by shyu1 » Thu Jun 25, 2009 2:06 pm

Post by shyu1
Thu Jun 25, 2009 2:06 pm

thanks for the quick responses.

I did install c, c++ and java compilers under the devel package when installing cygwin. however, when i try using the manual compile with the "gcc -o..." line it says that the files or folders do not exist.

i'll try writing a hello world program and seeing if cygwin compiles it.

i'm pretty sure i untarred(?) the two tgz files in the same directory. but buchileno, you mention three files. i was under the impression we only needed to download two.

thanks again for all your help.
thanks for the quick responses.

I did install c, c++ and java compilers under the devel package when installing cygwin. however, when i try using the manual compile with the "gcc -o..." line it says that the files or folders do not exist.

i'll try writing a hello world program and seeing if cygwin compiles it.

i'm pretty sure i untarred(?) the two tgz files in the same directory. but buchileno, you mention three files. i was under the impression we only needed to download two.

thanks again for all your help.
shyu1
Newbie
Newbie
Posts: 6
Joined: Wed Jun 24, 2009 8:32 pm

Post by buhochileno » Thu Jun 25, 2009 2:43 pm

Post by buhochileno
Thu Jun 25, 2009 2:43 pm

shyu1 wrote:thanks for the quick responses.

I did install c, c++ and java compilers under the devel package when installing cygwin. however, when i try using the manual compile with the "gcc -o..." line it says that the files or folders do not exist.

i'll try writing a hello world program and seeing if cygwin compiles it.

i'm pretty sure i untarred(?) the two tgz files in the same directory. but buchileno, you mention three files. i was under the impression we only needed to download two.

thanks again for all your help.


the third one is libcompat witch have the "programmer", but the 2 one needed to compile example.c is libbioloid and libavr unpacket in the same folder, I mean your tree must look something like this:

rootFolder
->libbioloid
->->bioloid
->-> ...
->libavr
->->libavr
->->stdint.h
->-> ...
->libcompat
->->compat
->-> ...
...
...
And yeap, making a simple helloword example to see if gcc have all in place first it sounds as a good test...

p.s: you can avoid all the troubles installing a lovely linux :-)
shyu1 wrote:thanks for the quick responses.

I did install c, c++ and java compilers under the devel package when installing cygwin. however, when i try using the manual compile with the "gcc -o..." line it says that the files or folders do not exist.

i'll try writing a hello world program and seeing if cygwin compiles it.

i'm pretty sure i untarred(?) the two tgz files in the same directory. but buchileno, you mention three files. i was under the impression we only needed to download two.

thanks again for all your help.


the third one is libcompat witch have the "programmer", but the 2 one needed to compile example.c is libbioloid and libavr unpacket in the same folder, I mean your tree must look something like this:

rootFolder
->libbioloid
->->bioloid
->-> ...
->libavr
->->libavr
->->stdint.h
->-> ...
->libcompat
->->compat
->-> ...
...
...
And yeap, making a simple helloword example to see if gcc have all in place first it sounds as a good test...

p.s: you can avoid all the troubles installing a lovely linux :-)
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by shyu1 » Thu Jun 25, 2009 3:38 pm

Post by shyu1
Thu Jun 25, 2009 3:38 pm

so the hello world program compiles and executes fine.

my tree is like this:
c/Bioloid
--->libavr
--->LICENSE libavr stind.h
--->libbioloid
--->LICENSE bioloid

both the libavr and libbioloid folders are under the Bioloid folder. there's a few other folders there such as the example folder.
so the hello world program compiles and executes fine.

my tree is like this:
c/Bioloid
--->libavr
--->LICENSE libavr stind.h
--->libbioloid
--->LICENSE bioloid

both the libavr and libbioloid folders are under the Bioloid folder. there's a few other folders there such as the example folder.
shyu1
Newbie
Newbie
Posts: 6
Joined: Wed Jun 24, 2009 8:32 pm

Post by buhochileno » Thu Jun 25, 2009 3:44 pm

Post by buhochileno
Thu Jun 25, 2009 3:44 pm

shyu1 wrote:so the hello world program compiles and executes fine.

my tree is like this:
c/Bioloid
--->libavr
--->LICENSE libavr stind.h
--->libbioloid
--->LICENSE bioloid

both the libavr and libbioloid folders are under the Bioloid folder. there's a few other folders there such as the example folder.


yeap, looks right, so no a folder/path issue..
shyu1 wrote:so the hello world program compiles and executes fine.

my tree is like this:
c/Bioloid
--->libavr
--->LICENSE libavr stind.h
--->libbioloid
--->LICENSE bioloid

both the libavr and libbioloid folders are under the Bioloid folder. there's a few other folders there such as the example folder.


yeap, looks right, so no a folder/path issue..
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by buhochileno » Thu Jun 25, 2009 3:57 pm

Post by buhochileno
Thu Jun 25, 2009 3:57 pm

StuartL wrote:
buhochileno wrote:and..by the way, what is the C standard used by the avr?, I mean I probably can't do a "fork" or pthread, so what are the boundries?


There are NO standard libraries in libbioloid. There's no implementation of fork(), select(), fopen() etc. Some of these could be implemented if you could think of a practical use but the AVR only runs at 16MHz and your idea of modern multitasking OSs will have to take a twenty year regression if you want to start multi-tasking :D

The most effective (or maybe easiest) way to use libbioloid is to write a simple linear programme that waits when it needs to wait (by looping etc) and sends commands when it needs to send commands. The interrupt handlers inside libbioloid will handle all the serial comms, retransmits, timers etc.

You could do more and implement your own timers and interrupts but you MUST be careful of interrupt priorities. The bus code is very time sensitive as you don't get many cycles to read incoming bytes by the time the interrupt overhead occurs.


ok, thanks Stuart, ohh allmost forget, how to setup a servo to do endless turns (wheel) with libbioloid?

Thanks again...
StuartL wrote:
buhochileno wrote:and..by the way, what is the C standard used by the avr?, I mean I probably can't do a "fork" or pthread, so what are the boundries?


There are NO standard libraries in libbioloid. There's no implementation of fork(), select(), fopen() etc. Some of these could be implemented if you could think of a practical use but the AVR only runs at 16MHz and your idea of modern multitasking OSs will have to take a twenty year regression if you want to start multi-tasking :D

The most effective (or maybe easiest) way to use libbioloid is to write a simple linear programme that waits when it needs to wait (by looping etc) and sends commands when it needs to send commands. The interrupt handlers inside libbioloid will handle all the serial comms, retransmits, timers etc.

You could do more and implement your own timers and interrupts but you MUST be careful of interrupt priorities. The bus code is very time sensitive as you don't get many cycles to read incoming bytes by the time the interrupt overhead occurs.


ok, thanks Stuart, ohh allmost forget, how to setup a servo to do endless turns (wheel) with libbioloid?

Thanks again...
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by RandomMatt » Thu Jun 25, 2009 6:21 pm

Post by RandomMatt
Thu Jun 25, 2009 6:21 pm

buhochileno wrote:how to setup a servo to do endless turns (wheel) with libbioloid?


You need to read the AX12 manual... page 17 says:
If both values for the CW Angle Limit and the CCW Angle Limit are set to 0, an Endless Turn mode can be implemented by setting the Goal Speed.


so...

Code: Select all
dx_set_minmax_angle(id, SERVO_MIN, SERVO_MIN);
dx_set_speed(id, speed);
buhochileno wrote:how to setup a servo to do endless turns (wheel) with libbioloid?


You need to read the AX12 manual... page 17 says:
If both values for the CW Angle Limit and the CCW Angle Limit are set to 0, an Endless Turn mode can be implemented by setting the Goal Speed.


so...

Code: Select all
dx_set_minmax_angle(id, SERVO_MIN, SERVO_MIN);
dx_set_speed(id, speed);
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by buhochileno » Thu Jun 25, 2009 8:53 pm

Post by buhochileno
Thu Jun 25, 2009 8:53 pm

RandomMatt wrote:
buhochileno wrote:how to setup a servo to do endless turns (wheel) with libbioloid?


You need to read the AX12 manual... page 17 says:
If both values for the CW Angle Limit and the CCW Angle Limit are set to 0, an Endless Turn mode can be implemented by setting the Goal Speed.


so...

Code: Select all
dx_set_minmax_angle(id, SERVO_MIN, SERVO_MIN);
dx_set_speed(id, speed);


yeap I read it, so I going something wrong...:

...
case 'y': //enable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MIN);
dx_set_speed(101, 100);
break;
case 'h': //disable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MAX);
//dx_set_speed(101, 100);
break;
RandomMatt wrote:
buhochileno wrote:how to setup a servo to do endless turns (wheel) with libbioloid?


You need to read the AX12 manual... page 17 says:
If both values for the CW Angle Limit and the CCW Angle Limit are set to 0, an Endless Turn mode can be implemented by setting the Goal Speed.


so...

Code: Select all
dx_set_minmax_angle(id, SERVO_MIN, SERVO_MIN);
dx_set_speed(id, speed);


yeap I read it, so I going something wrong...:

...
case 'y': //enable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MIN);
dx_set_speed(101, 100);
break;
case 'h': //disable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MAX);
//dx_set_speed(101, 100);
break;
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

Post by RandomMatt » Thu Jun 25, 2009 11:19 pm

Post by RandomMatt
Thu Jun 25, 2009 11:19 pm

buhochileno wrote:yeap I read it, so I going something wrong...:

...
case 'y': //enable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MIN);
dx_set_speed(101, 100);
break;
case 'h': //disable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MAX);
//dx_set_speed(101, 100);
break;


Whoops... my mistake. I should have thought more about what happens when...
When the supervisor initialises the robot it sends the min/max angles from the robot structure to the servo - and then it locks the servo - preventing any update to them.

So:
    * if you want some servos in endless turn mode all the time, and other servos not in endless turn mode all the time - its easy
    * if you want ot do other stuff, you'll have to disable the supervisor by adding "-DNO_SUPERVISOR -DNO_SUPERVISOR_INITROBOT" to your CFLAGS_AVR. I think your code will then work.
buhochileno wrote:yeap I read it, so I going something wrong...:

...
case 'y': //enable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MIN);
dx_set_speed(101, 100);
break;
case 'h': //disable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MAX);
//dx_set_speed(101, 100);
break;


Whoops... my mistake. I should have thought more about what happens when...
When the supervisor initialises the robot it sends the min/max angles from the robot structure to the servo - and then it locks the servo - preventing any update to them.

So:
    * if you want some servos in endless turn mode all the time, and other servos not in endless turn mode all the time - its easy
    * if you want ot do other stuff, you'll have to disable the supervisor by adding "-DNO_SUPERVISOR -DNO_SUPERVISOR_INITROBOT" to your CFLAGS_AVR. I think your code will then work.
RandomMatt
Savvy Roboteer
Savvy Roboteer
Posts: 117
Joined: Sat Dec 20, 2008 11:16 pm

Post by buhochileno » Fri Jun 26, 2009 3:33 pm

Post by buhochileno
Fri Jun 26, 2009 3:33 pm

RandomMatt wrote:
buhochileno wrote:yeap I read it, so I going something wrong...:

...
case 'y': //enable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MIN);
dx_set_speed(101, 100);
break;
case 'h': //disable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MAX);
//dx_set_speed(101, 100);
break;


Whoops... my mistake. I should have thought more about what happens when...
When the supervisor initialises the robot it sends the min/max angles from the robot structure to the servo - and then it locks the servo - preventing any update to them.

So:
    * if you want some servos in endless turn mode all the time, and other servos not in endless turn mode all the time - its easy
    * if you want ot do other stuff, you'll have to disable the supervisor by adding "-DNO_SUPERVISOR -DNO_SUPERVISOR_INITROBOT" to your CFLAGS_AVR. I think your code will then work.


ohh yeap, I allways forget the supervisor...yeap it work perfect now, thanks again..

Mauricio
RandomMatt wrote:
buhochileno wrote:yeap I read it, so I going something wrong...:

...
case 'y': //enable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MIN);
dx_set_speed(101, 100);
break;
case 'h': //disable endless turn (wheel)
dx_set_minmax_angle(101, SERVO_MIN, SERVO_MAX);
//dx_set_speed(101, 100);
break;


Whoops... my mistake. I should have thought more about what happens when...
When the supervisor initialises the robot it sends the min/max angles from the robot structure to the servo - and then it locks the servo - preventing any update to them.

So:
    * if you want some servos in endless turn mode all the time, and other servos not in endless turn mode all the time - its easy
    * if you want ot do other stuff, you'll have to disable the supervisor by adding "-DNO_SUPERVISOR -DNO_SUPERVISOR_INITROBOT" to your CFLAGS_AVR. I think your code will then work.


ohh yeap, I allways forget the supervisor...yeap it work perfect now, thanks again..

Mauricio
buhochileno
Savvy Roboteer
Savvy Roboteer
Posts: 37
Joined: Sat Jun 13, 2009 2:05 am

PreviousNext
289 postsPage 10 of 201 ... 7, 8, 9, 10, 11, 12, 13 ... 20
289 postsPage 10 of 201 ... 7, 8, 9, 10, 11, 12, 13 ... 20