Asento tunnistin Tilt switch with led matrix images

Dependencies:   microbit

Revision:
0:174c437ba62b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Aug 17 13:33:43 2018 +0000
@@ -0,0 +1,25 @@
+
+#include "MicroBit.h"
+
+MicroBit uBit;
+MicroBitImage STOP("255,255,255\n255,255,255\n255,255,255\n");
+MicroBitImage PLAY("255,0,0\n255,255,0\n255,255,255\n255,255,0\n255,0,0\n");
+int asento = 0;
+
+int main(){
+    uBit.init();
+    while (1){
+        asento = uBit.io.P0.getDigitalValue();     
+        MicroBitImage image(5,5);
+        if(asento == 1){
+            image.paste(PLAY, 1, 0);
+            uBit.display.print(image);
+            uBit.sleep(1000);
+            } else {
+                image.paste(STOP, 1, 1);
+                uBit.display.print(image);
+                uBit.sleep(1000);
+                }
+    }    
+}
+