iotass5

Dependencies:   C12832 mbed

Revision:
2:abf92acbdd90
Parent:
1:469f8bbbd5f0
Child:
3:3914abc1330d
diff -r 469f8bbbd5f0 -r abf92acbdd90 main.cpp
--- a/main.cpp	Thu Jan 21 23:53:57 2016 +0000
+++ b/main.cpp	Fri Jan 22 00:15:06 2016 +0000
@@ -12,6 +12,7 @@
 PwmOut speaker(D6);
 
 InterruptIn sw3(PTA4);
+InterruptIn sw2(PTC6);
 
 volatile int bufferInsert = 0;
 volatile int currentBufferSize = 0;
@@ -61,12 +62,19 @@
     host.printf("niklas ping-");
 }
 
+void sw2interrupt(void){
+    lcd.cls();    
+}
+
 int main(void){
     host.baud(38400);
     
     sw3.mode(PullUp);
     sw3.fall(&sw3interrupt);
     
+    sw2.mode(PullUp);
+    sw2.fall(&sw2interrupt);
+    
     host.attach(&rxInterrupt, Serial::RxIrq);
     
     for(;;){