public class RPIServoBlasterProvider extends Object implements ServoProvider
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_P1_27
public static final String PIN_P1_28
public static final String PIN_P1_29
public static final String PIN_P1_31
public static final String PIN_P1_32
public static final String PIN_P1_33
public static final String PIN_P1_35
public static final String PIN_P1_36
public static final String PIN_P1_37
public static final String PIN_P1_38
public static final String PIN_P1_40
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–2021 Pi4J. All rights reserved.