test

Dependencies:   mbed FXOS8700Q

Revision:
0:2ab98cdf79ea
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri May 15 01:56:09 2020 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+ 
+InterruptIn button(SW2);
+DigitalOut led1(LED_RED);
+DigitalOut led2(LED_GREEN);
+DigitalOut led3(LED_BLUE);
+DigitalOut flash(LED4);
+ 
+void flip() {
+    led1 = !led1;
+    led2 = !led2;
+    led3 = !led3;
+}
+ 
+int main() {
+    //button.rise(&flip);  // attach the address of the flip function to the rising edge
+    while(1) {           // wait around, interrupts will interrupt this!
+            //led1 = 0;
+            //led2 = 0;
+            //led3 = 0;
+        //while(button){
+        flash = !flash;
+        //wait(0.25);
+        //flip();
+        //}
+    }
+}
\ No newline at end of file