Compare commits

..

No commits in common. "166cf421200572f99265418d8b661f4cffa053d2" and "8c51bfb8e7286e2881e51941a1a020ceabee1323" have entirely different histories.

3 changed files with 13 additions and 74 deletions

View File

@ -1,38 +0,0 @@
El kit Incluye:
1 x Placa de Desarrollo Uno R3 con Chip CH340
1 x Cable USB
65 x Jumpers Protoboard
1 x Protoboard de 830 puntos
15 x LEDs (Rojo, Verde, Amarillo)
30 x Resistencias (220, 10K, 1K)
10 x Dupont Macho-Hembra
1 x Potenciometro 10K
1 x Buzzer Activo
1 x Buzzer Pasivo
1 x 74HC595N (Shift register, chip suelto)
1 x Receptor Infrarrojo
1 x LM35DZ (temperatura)
1 x Sensor Llama (rojo con mic)
5 x Switches boton c/Tope
1 x Control Remoto Infrarrojo
1 x Display 1 digito
1 x Display 4 digitos
1 x Display Matrix 8x8
1 x Motor paso a paso de 5V
1 x Display LCD 1602
1 x Joystick PS2
1 x Sensor Digital de Temperatura y Humedad DHT11 (carcaza azul)
1 x Sensor de nivel de Agua (rojo largo)
1 x Modulo RFID
1 x Llavero RFID
1 x Tarjeta RFID
1 x Modulo sensor de Sonidos
1 x Modulo Relay de 1 canal
1 x Teclado matriz de 16 botones
1 x Modulo RGB de 3 colores
1 x Conector para batería de 9V
1 x Servo Motor SG90
1 x Modulo RTC
1 x Modulo Driver UNL2003 (plaquita con chip y leds)
1 x Sensor de inclinación (parece capacitor)
3 x Foto Resistencias

View File

@ -19,8 +19,7 @@ const int DOOR_SENSOR_PIN = 13;
int currentDoorState; // current state of door sensor
int lastDoorState; // previous state of door sensor
bool isArmed = true;
bool muted = false;
bool ledOn = true;
bool muted = true;
void setup()
{
@ -47,19 +46,9 @@ unsigned long lastTime;
void showAlarm(bool fired)
{
if(!ledOn)
{
offLed();
return;
}
if(fired)
{
if(isArmed)
{
showRed();
}else{
showYellow();
}
showRed();
return;
}
if(isArmed)
@ -94,11 +83,6 @@ void handleIR(){
Serial.println("Alarm is " + String(isArmed ? "Armed" : "Disarmed"));
// playTone();
break;
case 70:
Serial.println("Led on/off");
ledOn=!ledOn;
showAlarm(false);
break;
default:
Serial.print("unk: ");
Serial.println(IrReceiver.decodedIRData.command);
@ -123,8 +107,6 @@ void handleDoor(){
if(!isArmed)
{
Serial.println("Alarm is dissarmed, not fireing");
delay(500);
showAlarm(true);
return;
}
Serial.println("Alarm is armed, firing");
@ -134,7 +116,6 @@ void handleDoor(){
}
else
if (lastDoorState == HIGH && currentDoorState == LOW) { // state change: HIGH -> LOW
delay(500);
Serial.println("The door-closing event is detected");
isArmed=true;
showAlarm(false);

View File

@ -4,34 +4,30 @@ int ledAzul = 6;
setupLeds(){
pinMode(ledRojo,OUTPUT);
pinMode(ledVerde,OUTPUT);
pinMode(ledAzul,OUTPUT);
}
void offLed(){
digitalWrite(ledRojo,0);
digitalWrite(ledVerde,0);
digitalWrite(ledAzul,0);
pinMode(ledVerde,OUTPUT);
pinMode(ledAzul,OUTPUT);
}
void showRed(){
digitalWrite(ledRojo,255);
digitalWrite(ledVerde,0);
digitalWrite(ledAzul,0);
digitalWrite(ledVerde,0);
digitalWrite(ledAzul,0);
}
void showGreen(){
digitalWrite(ledRojo,0);
digitalWrite(ledVerde,255);
digitalWrite(ledAzul,0);
digitalWrite(ledVerde,255);
digitalWrite(ledAzul,0);
}
void showYellow(){
digitalWrite(ledRojo,255);
digitalWrite(ledVerde,255);
digitalWrite(ledAzul,0);
digitalWrite(ledVerde,255);
digitalWrite(ledAzul,0);
}
void showBlue(){
digitalWrite(ledRojo,0);
digitalWrite(ledVerde,0);
digitalWrite(ledAzul,255);
digitalWrite(ledVerde,0);
digitalWrite(ledAzul,255);
}