テスト

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
e5119053f6
Date:
Tue Aug 30 04:53:55 2022 +0000
Commit message:
hello

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 f33f5df14a61 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Aug 30 04:53:55 2022 +0000
@@ -0,0 +1,41 @@
+#include "mbed.h"
+Serial pc(USBTX,USBRX,115200);
+DigitalOut myled1(LED1);
+DigitalOut myled2(LED2);
+DigitalOut myled3(LED3);
+DigitalOut myled4(LED4);
+DigitalOut L1(p5);
+DigitalOut L2(p6);
+DigitalOut L3(p18);
+DigitalIn sw(p7);
+
+Ticker t;
+
+void warikomi(){
+    myled3=!myled3;
+    }
+int main()
+{
+    t.attach(&warikomi,1);
+    while(sw) {
+    }
+    while(1) {
+        pc.printf("%d \r\n",sw.read());
+        myled1 = 1;
+        myled2 = 0;
+        //myled3 = 1;
+        myled4 = 0;
+        L1=1;
+        L2=0;
+        L3=1;
+        wait(0.2);
+        myled1 = 0;
+        myled2 = 1;
+        //myled3 = 0;
+        myled4 = 1;
+        L1=0;
+        L2=1;
+        L3=0;
+        wait(0.2);
+    }
+}
diff -r 000000000000 -r f33f5df14a61 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Aug 30 04:53:55 2022 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file