#include <Wire.h>
// Define the two analog inputs for the joysticks
#define joystick1 A0
#define joystick2 A2
void setup() {
// Initialize the serial communication
Serial.begin(512);
// Initialize the I2C communication
Wire.begin();
}
void loop() {
// Read the Y values from the joysticks
int Y1 = analogRead(joystick1);
int Y2 = analogRead(joystick2);
// Print the values to the serial monitor
Serial.print("Y1: ");
Serial.print(Y1);
Serial.print(" Y2: ");
Serial.println(Y2);
// Wait for a moment
delay(100);
}