public class RPIServoBlasterProvider extends Object implements ServoProvider
Modifier and Type | Field and Description |
---|---|
protected Map<Pin,RPIServoBlasterServoDriver> |
allocatedDrivers |
static Map<Pin,String> |
PIN_MAP |
static String |
PIN_P1_11 |
static String |
PIN_P1_12 |
static String |
PIN_P1_13 |
static String |
PIN_P1_15 |
static String |
PIN_P1_16 |
static String |
PIN_P1_18 |
static String |
PIN_P1_19 |
static String |
PIN_P1_21 |
static String |
PIN_P1_22 |
static String |
PIN_P1_23 |
static String |
PIN_P1_24 |
static String |
PIN_P1_25 |
static String |
PIN_P1_26 |
static String |
PIN_P1_3 |
static String |
PIN_P1_5 |
static String |
PIN_P1_7 |
static String |
PIN_P5_3 |
static String |
PIN_P5_4 |
static String |
PIN_P5_5 |
static String |
PIN_P5_6 |
static Map<String,Pin> |
REVERSE_PIN_MAP |
static String |
SERVO_BLASTER_DEV |
static String |
SERVO_BLASTER_DEV_CFG |
protected File |
servoBlasterDev |
protected File |
servoBlasterDevCfg |
protected Writer |
writer |
Constructor and Description |
---|
RPIServoBlasterProvider()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
ensureWriterIsCreated() |
List<Pin> |
getDefinedServoPins()
This method returns a list of pins this provider implementation
can drive.
|
ServoDriver |
getServoDriver(Pin servoPin)
Returns new instance of
RPIServoBlasterServoDriver . |
protected void |
updateServo(String pinName,
int value) |
public static final String PIN_P1_3
public static final String PIN_P1_5
public static final String PIN_P1_7
public static final String PIN_P1_11
public static final String PIN_P1_12
public static final String PIN_P1_13
public static final String PIN_P1_15
public static final String PIN_P1_16
public static final String PIN_P1_18
public static final String PIN_P1_19
public static final String PIN_P1_21
public static final String PIN_P1_22
public static final String PIN_P1_23
public static final String PIN_P1_24
public static final String PIN_P1_25
public static final String PIN_P1_26
public static final String PIN_P5_3
public static final String PIN_P5_4
public static final String PIN_P5_5
public static final String PIN_P5_6
public static final String SERVO_BLASTER_DEV
public static final String SERVO_BLASTER_DEV_CFG
protected File servoBlasterDev
protected File servoBlasterDevCfg
protected Writer writer
protected Map<Pin,RPIServoBlasterServoDriver> allocatedDrivers
public RPIServoBlasterProvider() throws IOException
IOException
- thrown in case file /dev/servoblaster does not exist.public List<Pin> getDefinedServoPins() throws IOException
ServoProvider
getDefinedServoPins
in interface ServoProvider
IOException
- in case there is an error providing list of pinspublic ServoDriver getServoDriver(Pin servoPin) throws IOException
RPIServoBlasterServoDriver
.getServoDriver
in interface ServoProvider
servoPin
- servo pin.RPIServoBlasterServoDriver
.IOException
- in case that servo driver cannnot be provided for asked pinprotected void ensureWriterIsCreated() throws IOException
IOException
protected void updateServo(String pinName, int value)
Copyright © 2012–2014 Pi4J. All rights reserved.