Professional Documents
Culture Documents
Commands:
psxLeft 0x0001
psxDown 0x0002
psxRight 0x0004
psxUp 0x0008
psxStrt 0x0010
psxSlct 0x0080
psxSqu 0x0100
psxX 0x0200
psxO 0x0400
psxTri 0x0800
psxR1 0x1000
psxL1 0x2000
psxR2 0x4000
psxL2 0x8000
#include <Psx.h> // Includes the Psx Library
#define dataPin 8
#define cmndPin 9
#define attPin 11
#define clockPin 10
#define LEDPin 13
void setup()
pin is used
// measured in microseconds.
//can be seen
Serial.begin(9600);
void loop()
if (data & psxR2) // If the data anded with a button's hex value is true,
else
digitalWrite(LEDPin, LOW); // If the button isn't pressed, turn off the LED
delay(20);