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

API for the ES08A Servo. More...

Detailed Description

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.

es08a.jpg
upm_servo.ES08A servo = new upm_servo.ES08A(6);
// Sets the shaft to 180, then to 90, then to 0,
// then back to 90, and finally back to 180,
// pausing for a second in between each angle
servo.setAngle(180);
System.out.println("Set angle to 180");
Thread.sleep(1000);
servo.setAngle(90);
System.out.println("Set angle to 90");
Thread.sleep(1000);
servo.setAngle(0);
System.out.println("Set angle to 0");
Thread.sleep(1000);
servo.setAngle(90);
System.out.println("Set angle to 90");
Thread.sleep(1000);
servo.setAngle(180);
System.out.println("Set angle to 180");

Public Member Functions

synchronized void delete ()
 
 ES08A (int pin)
 
- Public Member Functions inherited from Servo
synchronized void delete ()
 
 Servo (int pin)
 
 Servo (int pin, int minPulseWidth, int maxPulseWidth)
 
 Servo (int pin, int minPulseWidth, int maxPulseWidth, int waitAndDisablePwm)
 
int setAngle (int angle)
 
int haltPwm ()
 
String name ()
 
void setMinPulseWidth (int width)
 
void setMaxPulseWidth (int width)
 
void setPeriod (int period)
 
int getMinPulseWidth ()
 
int getMaxPulseWidth ()
 
int getPeriod ()
 

Constructor & Destructor Documentation

ES08A ( int  pin)

Instantiates an ES08A object

Parameters
pinServo pin number
Inheritance diagram for ES08A:
Inheritance graph
[legend]
Collaboration diagram for ES08A:
Collaboration graph
[legend]

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