A simple digital lock with attempted audio guidance

Dependencies:   FATFileSystem TextLCD mbed

Fork of Digital_Lock_with_audio by NITH ece

Revision:
5:d45608f231d3
Parent:
4:74d697416c75
--- a/main.cpp	Sun May 12 09:04:10 2013 +0000
+++ b/main.cpp	Fri May 17 17:17:24 2013 +0000
@@ -53,8 +53,8 @@
 int counter = 0;
 int count2 = 0;
 int k=0;
-DigitalOut myled(p11);
-DigitalOut myled1(p12);
+DigitalOut servo1(p11);
+DigitalOut servo2(p12);
 //------------------------------------------- Create the interrupt receiver object on pin 26
 InterruptIn interrupt(p26);
  
@@ -72,7 +72,7 @@
 
 //---------------------------------------------------------------------------------------------playing audio
 AnalogOut DACout(p18);
-DigitalOut digout(LED4);
+//DigitalOut digout(LED4);
 Ticker tick;
 SDFileSystem sd(p5, p6, p7, p8, "sd"); // NGX mbed base board
 
@@ -271,10 +271,10 @@
 void dac_out()
 {
   if (DAC_on) {
-    digout=1;
+    led4=1;
     DACout.write_u16(DAC_fifo[DAC_rptr]);
     DAC_rptr=(DAC_rptr+1) & 0xff;
-    digout=0;
+    led4=0;
   }
 }
 
@@ -393,11 +393,11 @@
                               lcd.cls();
                               lcd.printf("opening door...\n"); 
                                play_wave("/sd/forest.wav");
-                              myled = 1;
-        myled1 = 0;
+                              servo1 = 1;
+        servo2 = 0;
         wait(5);
-        myled = 0;
-        myled1 = 1;
+        servo1 = 0;
+        servo2 = 1;
         wait(5);
                               goto AGAIN;
                            }