#include < Servo.h >
#include < Ultrasonic.h >
#include < Wire.h >
#include < Adafruit_GFX.h >
#include < Adafruit_SSD1306.h >
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
#define OLED_RESET - 1
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, & Wire, OLED_RESET);
Servo servoMotor;
Ultrasonic ultrasonic(12, 11); // Trig pin, Echo pin
const int joyXPin = A0; // Pin del joystick para la dirección X
const int buttonPin = 2; // Pin del botón de inicio/parada
const int servoSpeed = 100; // Velocidad del servomotor
const int motorPin1 = 3; // Pin 1 del L298N para control del motor
const int motorPin2 = 4; // Pin 2 del L298N para control del motor
int distanciaCorte = 0;