beep keypad

Dependencies:   TextLCD mbed

Fork of Autus by Umair Aftab

Revision:
1:9ef26efedcea
Child:
2:97a458c4c997
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Mar 06 03:36:40 2014 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+#define     BAUDRATE0       1200
+
+#include "keypad.h"
+#include "buzz.h"
+
+Serial pc(PTE20,PTE21);
+Ticker timer1ms;
+
+extern void timer1(void);
+extern void beep(float freq,int time);
+extern char Keypad();
+
+int main(void)
+{
+    timer1ms.attach(&timer1, 0.001); //interrupt attached function(timer) with interval (1 ms)
+    pc.baud( BAUDRATE0 );
+    char key;
+    // lcd.cls();
+    while(1) {
+        //  lcd.cls();
+        key = Keypad();
+        //if (key!=NULL)
+        //{}
+        pc.printf("k\n");
+        
+        wait(0.2);
+        //  if(key != 100) {
+        //      pc.printf("keypad = %f\n", key);
+        //
+  }
+        //     lcd.printf("%c\n\r",&key);
+        //wait(0.2);
+        
+}
\ No newline at end of file