SISTEMA DE SEGURIDAD AUTOVIL
SOLO CON SENSOR DE ULTRASONIDO #include <NewPing.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #define TRIGGER_PIN 4 // Arduino pin tied to trigger pin on the ultrasonic sensor. #define ECHO_PIN 3 // Arduino pin tied to echo pin on the ultrasonic sensor. #define MAX_DISTANCE 400 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. long previousMillis = 0 ; long previousPanico = 0 ; long Tespera1 = 30000 ; long Tespera2 = 10000 ; long intervalEspera = 10000 ; long tiempoBoton = 3000 ; int Pot = A0; int Dist = 0 ; int Led = 11 ; // 10 ** CAMBIAR POR D11 EN PCB MEJORADO int Buzzer = 9 ; int Rele1 = A1; int Rele2 = A3; int Boton1 = 6 ; int EstadoBoton1 = 0 ; int EstadoBoton2 = 0 ; int Boton2 = 10 ; //9 CAMBIAR POR D10 EN PCB MEJORADO int Presencia = 1 ; int Panico = 0 ; int EstadoA = 0 ; int EstadoB = 0 ; int...