// This is a simple Arduino program to // read the value of digital pin 7 // coming from Atari 800xl joystick port 1 // initializations void setup() { Serial.begin(9600); // Initialize serial communication pinMode(7, INPUT); // Set digital pin 7 as input to program } // A loop to read value of digital pin 7 and print // to the serial monitor in the Arduino IDE void loop() { int value = digitalRead(7); // Read the value from digital pin 7 char zero[] = "Joystick Data = 0"; char one[] = "Joystick Data = 1"; if(value == 0) // joystick sending 0s as data from POKE 54016,0 { Serial.println(zero); } if(value == 1) // joystick sending 1s as data from POKE 54016,255 { Serial.println(one); } delay(3000); // Delay for 3000 milliseconds or 3 seconds }