WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation


A 'robot-side' function that talks over a UART to a terminal program that helps you to configure the centre and range of any servos you are using.
ServoDriver. center()
Because this is a mini-application then it will never return. If you have multiple banks of servos then you should center each bank individually.
Create your servos as usual in Project Designer and generate the project code setting the default output device to the uart that is used to talk to your PC.
Assuming that you have created a number of servos and that you have called them 'bank1':-
// This is the main loop
TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart){
    bank1.center(); // Talk to the terminal program
    return 0;
From your terminal program (eg HyperTerminal) the following commands are available:
L - This will list all of the servos with their current centre and range values
N - Select the next servo
P - Select the previous servo
C - Centring mode
R - Ranging mode
+ - Add 1 to the current centre or range value
* - Add 10 to the current centre or range value
- - Subtract 1 from the current centre or range value
/ - Subtract 10 from the current centre or range value
Any other key will display the above list
Once you have finished setting up the servos you should issue the L command and note down the centre and range values for each servo. Go back to Project Designer and enter these values in the servo definitions.
See Also



Valid XHTML 1.0 Transitional