#include <ArDPPTU.h>
ArPTZ implementation for Directed Perceptions pan-tilt units
Note that there are far too many functions enabled in here, most of which are extraneous. The important ones are defined in the ArPTZ class and include the basic pan, tilt commands.
The DPPTU's pan and tilt commands work on a number of units equal to (degrees / 0.514). The panTilt function always rounds the conversion closer to zero, so that a magnitude greater than the allowable range of movement is not sent to the camera.
If the DPPTU is connected to the microcontroller, make sure that the baud rate of the microcontroller-DPPTU connection is at least as fast, if not faster than the connection of the computer to the microcontroller. If it's slower then the commands sent to the DPPTU may get backed up in the AUX port buffer and cause the DPPTU to behave erratically. So, if the computer-microcontroller connection is autobauding up to 38400bps, then make sure that the microcontroller aux port is set to 38400bps, as well, and consult the DPPTU manual for directions on changing its baud rate.
Public Types | |
enum | { DELIM = 0x20, INIT = 0x40, ACCEL = 0x61, BASE = 0x62, CONTROL = 0x63, DISABLE = 0x64, ENABLE = 0x65, FACTORY = 0x66, HALT = 0x68, IMMED = 0x69, LIMIT = 0x6C, MONITOR = 0x6D, OFFSET = 0x6F, PAN = 0x70, RESET = 0x72, SPEED = 0x73, TILT = 0x74, UPPER = 0x75, VELOCITY = 0x76 } |
anonymous enum |