pyupm_servo module

class pyupm_servo.ES08A(pin)[source]

Bases: pyupm_servo.Servo

API for the ES08A Servo.

ID: es08a

Name: High-sensitivity Mini Servo

Other Names: Grove Servo

Category: servos

Manufacturer: emax

Link:https://www.seeedstudio.com/EMAX-9g-ES08A-High-Sensitive-Mini- Servo-p-760.html

Connection: pwm

Kit: gsk This module defines the ES08A interface for ES08A servos. Like other servos, the ES08A servo has a shaft that can be controlled by setting the desired angle. There are also routines for setting and getting the minimum and maximum pulse width as well as the maximum period.

C++ includes: es08a.hpp

class pyupm_servo.ES9257(pin)[source]

Bases: pyupm_servo.Servo

API for the ES9257 Servo.

ID: es9257

Name: Micro Digital 3D Tail Servo

Other Names: Grove Servo

Category: servos

Manufacturer: emax

Link:https://www.seeedstudio.com/EMAX-ES9257-2.5kg%26amp%3B-.05-sec- Micro- Digital-3D-Tail-Servo-p-762.html

Connection: pwm

Kit: gsk This module defines the ES9257 interface for ES9257 servos. The ES9257 servo is a fast, heavy duty servo that is popular for moving the control surfaces on RC models.

C++ includes: es9257.hpp

class pyupm_servo.Servo(*args)[source]

Bases: object

getMaxPulseWidth()[source]

int getMaxPulseWidth()

Returns the maximum pulse width

Maximum pulse width

getMinPulseWidth()[source]

int getMinPulseWidth()

Returns the minimum pulse width

Minimum pulse width

getPeriod()[source]

int getPeriod()

Returns the maximum PWM period width

Maximum PWM period width

haltPwm()[source]

mraa_result_t haltPwm()

Halts PWM for this servo and allows it to move freely.

name()[source]

std::string name()

Returns the name of the component

Name of the component

setAngle(angle)[source]

mraa_result_t setAngle(int angle)

Sets the angle of the servo engine.

angle: Number between 0 and 180

0 if successful, non-zero otherwise

setMaxPulseWidth(width)[source]

void setMaxPulseWidth(int width)

Sets the maximum pulse width

width: Maximum HIGH signal width

setMinPulseWidth(width)[source]

void setMinPulseWidth(int width)

Sets the minimum pulse width

width: Minimum HIGH signal width

setPeriod(period)[source]

void setPeriod(int period)

Sets the maximum period width

period: PWM period width