Author Topic: webbotlib servo probs  (Read 711 times)

0 Members and 1 Guest are viewing this topic.

Offline Robot_LongbordrTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
webbotlib servo probs
« on: February 10, 2012, 10:21:39 PM »
Hey after reading over the ERP example code and reading through the servo part of the axon function list http://www.societyofrobots.com/axon/axon_function_list.shtml#programs it would seem the servos are controlled through funcitions but the functions to control them are not elaborated on. when i try to build the code it gives the error message "servo is not a function" servo being the name of the servo im trying to control.

The project im using was auto built by the webbotlib project designer

Am i doing something wrong?
How would i go about using webbotlib to control a servo? and the microcontroller im using is the Axon 2
« Last Edit: February 11, 2012, 01:09:56 PM by Robot_Longbordr »

Offline Robot_LongbordrTopic starter

  • Jr. Member
  • **
  • Posts: 34
  • Helpful? 0
Re: webbotlib servo probs
« Reply #1 on: February 10, 2012, 11:09:44 PM »
I don't think i elaborated enough, i meant is there a way to control servos so that they turn to a specific angle, like if i was to give it a value and it would turn to that corresponding value, instead of just changing the speed from zero to something else. It looks like the code for the ERP just passes to the servo a servo position.
Quote
//move arm into centered vertical position
      arm_right_base(620);
      arm_right_J1(750);
      arm_right_J2(350);
this is from the fetch.c file of the ERP code

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,121
  • Helpful? 108
Re: webbotlib servo probs
« Reply #2 on: February 11, 2012, 09:10:38 PM »
Admins ERP code doesn't use WebbotLib - it uses his own stuff from before WebbotLib was born.

Quote
How would i go about using webbotlib to control a servo?
When you generate the code for your project and it contains some servos then the example code will show an example of how to move each servo back and forwards. Look in 'example.txt' generated into your project directory.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,632
  • Helpful? 169
    • Society of Robots
Re: webbotlib servo probs
« Reply #3 on: February 24, 2012, 11:51:56 AM »
Admins ERP code doesn't use WebbotLib - it uses his own stuff from before WebbotLib was born.

The most recent ERP version does . . . I think Robot_Longbordr is looking at an earlier version.

See this:
http://www.societyofrobots.com/downloads/ERP_code_020110.zip

 


Get Your Ad Here