upm  0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
Public Member Functions | List of all members

API for the Adafruit Servo Shield. More...

Detailed Description

UPM library for the PCA9685-based Adafruit 16-channel servo shield. If 3 or more GWS servos are attached, results could be unpredictable. Adafruit Industries recommend installing a capacitor on the board, which should alleviate the issue. Sizing depends on servos and their number.

adafruitss.jpg

Public Member Functions

synchronized void delete ()
 
 adafruitss (int bus, int i2c_address)
 
int update ()
 
void setPWMFreq (float freq)
 
void servo (short port, short servo_type, float degrees)
 

Constructor & Destructor Documentation

adafruitss ( int  bus,
int  i2c_address 
)

Creates an adafruitss object

Parameters
busNumber of the used I2C bus
i2c_addressAddress of the servo shield on the I2C bus

Member Function Documentation

void servo ( short  port,
short  servo_type,
float  degrees 
)

Moves one of the servos to a specified angle

Parameters
portPort of the servo on the shield (servo number)
servo_typeCan be 0 = standard (1ms to 2ms), 1 = extended (0.6ms to 2.4ms), or 2 = extended (0.8ms to 2.2ms)
degreesAngle to set the servo to
void setPWMFreq ( float  freq)

Sets the frequency of the servos

Parameters
freqFrequency at which the servos operate

The documentation for this class was generated from the following file: