Package com.pi4j.wiringpi
Class Nes
- java.lang.Object
-
- com.pi4j.wiringpi.Nes
-
public class Nes extends Object
Before using the Pi4J library, you need to ensure that the Java VM in configured with access to the following system libraries:
- pi4j
- wiringPi
This library depends on the wiringPi native system library. (developed by Gordon Henderson @ http://wiringpi.com/)
- Author:
- Robert Savage (http://www.savagehomeautomation.com)
- See Also:
- https://pi4j.com/, http://wiringpi.com/dev-lib/
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_NES_JOYSTICKS
static int
NES_A
static int
NES_B
static int
NES_DOWN
static int
NES_LEFT
static int
NES_RIGHT
static int
NES_SELECT
static int
NES_START
static int
NES_UP
static int
PULSE_TIME
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
readNesJoystick(int joystick)
readNesJoystick:static int
setupNesJoystick(int dPin, int cPin, int lPin)
setupNesJoystick:
-
-
-
Field Detail
-
NES_RIGHT
public static final int NES_RIGHT
- See Also:
- Constant Field Values
-
NES_LEFT
public static final int NES_LEFT
- See Also:
- Constant Field Values
-
NES_DOWN
public static final int NES_DOWN
- See Also:
- Constant Field Values
-
NES_UP
public static final int NES_UP
- See Also:
- Constant Field Values
-
NES_START
public static final int NES_START
- See Also:
- Constant Field Values
-
NES_SELECT
public static final int NES_SELECT
- See Also:
- Constant Field Values
-
NES_B
public static final int NES_B
- See Also:
- Constant Field Values
-
NES_A
public static final int NES_A
- See Also:
- Constant Field Values
-
PULSE_TIME
public static final int PULSE_TIME
- See Also:
- Constant Field Values
-
MAX_NES_JOYSTICKS
public static final int MAX_NES_JOYSTICKS
- See Also:
- Constant Field Values
-
-
Method Detail
-
setupNesJoystick
public static int setupNesJoystick(int dPin, int cPin, int lPin)
setupNesJoystick:
Create a new NES joystick interface, program the pins, etc.
- Parameters:
dPin
- data pincPin
- clock pinlPin
- pin number- Returns:
- return joystick handle
-
readNesJoystick
public static int readNesJoystick(int joystick)
readNesJoystick:
Do a single scan of the NES Joystick.
- Parameters:
joystick
- joystick handle- Returns:
- return value
-
-