#include <Servo.h>
Servo motor1;
Servo motor2;
int joystick_VERT;
int joystick_HORZ;
#define VERT_PIN A0
#define HORZ_PIN A1
#define SEL_PIN 2
void setup() {
motor1.attach(3); // Attachez le premier servo à la broche 3
motor2.attach(5); // Attachez le second servo à la broche 5
}
void loop() {
joystick_VERT = analogRead(VERT_PIN);
joystick_HORZ = analogRead(HORZ_PIN);
int angle_HORZ = map(joystick_VERT, 0, 1023, 0, 180);
int angle_VERT = map(joystick_HORZ, 0, 1023, 0, 180);
motor1.write(angle_HORZ);
motor2.write(angle_VERT);
}