Alarma con sensores PIR de calor los detecta por medio de interrupciones, que filtran falsos disparos del sensor, da orden de grabar video con tres cámaras, acciona una sirena

Dependencies:   mbed

Fork of INTERUPCIONES by Gustavo Ramirez

Revision:
0:38bcc53b1324
Child:
1:d8dfdd1c3f6b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Apr 20 20:08:14 2016 +0000
@@ -0,0 +1,50 @@
+/*
+ESTE PROGRAMA ES PARA PROBAR INTERUPCIONES POR CAMBIO EN ENTRADA DIGITAL
+ESTAN PROHIBIDOS PARA SIGUIENTES ENTRADAS
+PRB0
+PTB1
+PTB2
+PTB3
+PTC2
+PTC1
+PTE0
+PTE1
+PTC8
+PTC9
+EL RESTO PUEDEN CON INTERUPCION
+SI SE IGNORA ESTO LA FRDMKL25Z SE BLOQUEA Y NO PERMITE CARGAR NINGUN PROGRAMA
+SI FUERON COMPROBADOS:
+PTD2
+PTA13
+PTD5
+PTD0
+PTD1--NO FUNCIONA
+PTD3
+PTA2--NO FUNCIONA
+PTA12
+PTA5
+PTA4
+PTD4
+PTA2--NO FUNCIONA..SE CONFUNCE CON EL PUERTO PTA1  SI SE PROGRAMA PTA2 Y EL CAMBIO ES EN PTA1 SI FUNCIONA
+PUERTO C NO FUNCIONA
+PTA17
+
+*/
+
+#include "mbed.h"
+ 
+InterruptIn button(PTA17);
+DigitalOut led(LED1);
+DigitalOut flash(LED3);
+ 
+void flip() {
+    led = !led;
+}
+ 
+int main() {
+    button.rise(&flip);  // attach the address of the flip function to the rising edge
+    while(1) {           // wait around, interrupts will interrupt this!
+        flash = !flash;
+        wait(0.25);
+    }
+}