UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

adafruitss Class

Module: adafruitss

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

Item Index

Methods

adafruitss

(
  • bus
  • i2c_address
)
Number

Creates an adafruitss object

Parameters:

  • bus Number

    Number of the used I2C bus

  • i2c_address Number

    Address of the servo shield on the I2C bus

Returns:

Number:

update

() Number

Returns:

Number:

setPWMFreq

(
  • freq
)

Sets the frequency of the servos

Parameters:

  • freq Number

    Frequency at which the servos operate

servo

(
  • port
  • servo_type
  • degrees
)

Moves one of the servos to a specified angle

Parameters:

  • port Number

    Port of the servo on the shield (servo number)

  • servo_type Number

    Can be 0 = standard (1ms to 2ms), 1 = extended (0.6ms to 2.4ms), or 2 = extended (0.8ms to 2.2ms)

  • degrees Number

    Angle to set the servo to