public enum GPIOPin extends java.lang.Enum<GPIOPin>
Those GPIO numbers correspond to those used by WiringPi.
The Raspberry Pi with 40-pin expansion header (cfr J8 Pinout (40-pin Header)) provides access to 26 programmable GPIO pins ([00,16] + [21,29] (GPIO [17,20] are not existing, for historical compatibility reason with Raspberry Pi Model B (Revision 2.0) additional P5 header).
We removed I2C, PWM and UART pins from those GPIO pins to avoid compatibility issues. You can then freely access each programmable GPIO pin from this enum to control LEDs, buttons, and others.
Enum Constant and Description |
---|
GPIO_00
Gpio Pin 0 (WiringPi numbering).
|
GPIO_02
Gpio Pin 2 (WiringPi numbering).
|
GPIO_03
Gpio Pin 3 (WiringPi numbering).
|
GPIO_04
Gpio Pin 4 (WiringPi numbering).
|
GPIO_05
Gpio Pin 5 (WiringPi numbering).
|
GPIO_06
Gpio Pin 6 (WiringPi numbering).
|
GPIO_07
Gpio Pin 7 (WiringPi numbering).
|
GPIO_10
Gpio Pin 10 (WiringPi numbering).
|
GPIO_11
Gpio Pin 11 (WiringPi numbering).
|
GPIO_12
Gpio Pin 12 (WiringPi numbering).
|
GPIO_13
Gpio Pin 13 (WiringPi numbering).
|
GPIO_14
Gpio Pin 14 (WiringPi numbering).
|
GPIO_21
Gpio Pin 21 (WiringPi numbering).
|
GPIO_22
Gpio Pin 22 (WiringPi numbering).
|
GPIO_24
Gpio Pin 24 (WiringPi numbering).
|
GPIO_25
Gpio Pin 25 (WiringPi numbering).
|
GPIO_26
Gpio Pin 26 (WiringPi numbering).
|
GPIO_27
Gpio Pin 27 (WiringPi numbering).
|
GPIO_28
Gpio Pin 28 (WiringPi numbering).
|
GPIO_29
Gpio Pin 29 (WiringPi numbering).
|
Modifier and Type | Method and Description |
---|---|
Pin |
getPin()
Get the Raspoid pin abstraction for this GPIOPin.
|
com.pi4j.io.gpio.Pin |
getWiringPiPin()
Get the WiringPi abstraction object corresponding to this Raspoid GPIOPin.
|
static GPIOPin |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static GPIOPin[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GPIOPin GPIO_00
Pin.PHYSICAL_11
public static final GPIOPin GPIO_02
Pin.PHYSICAL_13
public static final GPIOPin GPIO_03
Pin.PHYSICAL_15
public static final GPIOPin GPIO_04
Pin.PHYSICAL_16
public static final GPIOPin GPIO_05
Pin.PHYSICAL_18
public static final GPIOPin GPIO_06
Pin.PHYSICAL_22
public static final GPIOPin GPIO_07
Pin.PHYSICAL_07
public static final GPIOPin GPIO_10
Pin.PHYSICAL_24
public static final GPIOPin GPIO_11
Pin.PHYSICAL_26
public static final GPIOPin GPIO_12
Pin.PHYSICAL_19
public static final GPIOPin GPIO_13
Pin.PHYSICAL_21
public static final GPIOPin GPIO_14
Pin.PHYSICAL_23
public static final GPIOPin GPIO_21
Pin.PHYSICAL_29
public static final GPIOPin GPIO_22
Pin.PHYSICAL_31
public static final GPIOPin GPIO_24
Pin.PHYSICAL_35
public static final GPIOPin GPIO_25
Pin.PHYSICAL_37
public static final GPIOPin GPIO_26
Pin.PHYSICAL_32
public static final GPIOPin GPIO_27
Pin.PHYSICAL_36
public static final GPIOPin GPIO_28
Pin.PHYSICAL_38
public static final GPIOPin GPIO_29
Pin.PHYSICAL_40
public static GPIOPin[] values()
for (GPIOPin c : GPIOPin.values()) System.out.println(c);
public static GPIOPin valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic Pin getPin()
Pin
public com.pi4j.io.gpio.Pin getWiringPiPin()
Pin