servo.h File Reference

Manages 24 servo motors. More...

#include "baseTypes.h"

Go to the source code of this file.

Defines

#define SERVO_MIN_POS   185
 Minimal servo position.

#define SERVO_MAX_POS   245
 Maximal servo position.


Functions

void servoSetPos (BYTE servoId, BYTE pos)
 This function sets a servo to the corresponding position.

void servoSetMask (BYTE boardId, BYTE port, BYTE mask)
 This function sets the servo mask that enable/disable servo-motors. It corresponds to 8 servos or 4 servos in the same time.

void servoEnable (BYTE servoId, BOOL enable)
 This function enable/disable one servo-motor.


Detailed Description

Manages 24 servo motors.

Author:
laurent Saint-Marcel(lstmarcel@yahoo.fr)
Date:
2002/09/02

Define Documentation

#define SERVO_MAX_POS   245
 

Maximal servo position.

See also:
servoSetPos

#define SERVO_MIN_POS   185
 

Minimal servo position.

See also:
servoSetPos


Function Documentation

void servoEnable BYTE    servoId,
BOOL    enable
 

This function enable/disable one servo-motor.

Parameters:
servoId  [0..23]
enable  TRUE => enable, FALSE => disable
See also:
servoSetMask

void servoSetMask BYTE    boardId,
BYTE    port,
BYTE    mask
 

This function sets the servo mask that enable/disable servo-motors. It corresponds to 8 servos or 4 servos in the same time.

Parameters:
boardId  [0..1] 0=>servoId=[0..11], 1=>servoId=[12..23]
port  [0..1] 0=>servoId=[0..7]+[12..19], 1=>servoId=[8..11]+[20..23]
mask  0=disable, 1=enable corresponding servo-motor
See also:
servoEnable

void servoSetPos BYTE    servoId,
BYTE    pos
 

This function sets a servo to the corresponding position.

Parameters:
servoId  [0..23]
pos  [SERVO_MIN_POS..SERVO_MAX_POS]
See also:
SERVO_MIN_POS , SERVO_MAX_POS


Generated on Mon Sep 2 23:36:09 2002 for SpiderRobot-WalkerManager