AT&T Developer Summit Hackathon 2016 / Mbed 2 deprecated frdm_Grove_Buzzer_Example

Dependencies:   mbed

Fork of frdm_Grove_Buzzer_Example by Freescale

Files at this revision

API Documentation at this revision

Comitter:
GregC
Date:
Sat Jan 02 01:19:38 2016 +0000
Commit message:
Freedom Seeed Grove Buzzer Example

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 53c936ea1ae7 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jan 02 01:19:38 2016 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+
+DigitalOut buzzer(D2);
+DigitalOut led_green(LED_GREEN);
+InterruptIn sw2(SW2);
+
+void sw2_release(void)
+{
+    led_green = !led_green;
+    buzzer = !buzzer;
+    
+    printf("On-board button SW2 was released.\n");
+}
+
+int main()
+{
+    sw2.rise(&sw2_release);
+    while (true) {
+    }
+}
+
+
+
+ 
+
+ 
diff -r 000000000000 -r 53c936ea1ae7 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Jan 02 01:19:38 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file