robostep8th / Mbed 2 deprecated doukaku

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
yuki0701
Date:
Sat Nov 21 08:17:05 2020 +0000
Commit message:
a

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 247c31683f0b main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Nov 21 08:17:05 2020 +0000
@@ -0,0 +1,55 @@
+#include "mbed.h"
+
+PwmOut motor1(p21);
+PwmOut motor2(p22);
+PwmOut motor3(p23);
+PwmOut motor4(p24);
+DigitalOut led(LED1);
+
+int main()
+{
+    motor1.period_us(10);
+    motor2.period_us(10);
+    motor3.period_us(10);
+    motor4.period_us(10);
+
+    while(1) {
+        
+        motor1=0.2;
+        motor2=0;
+        motor3=0.2;
+        motor4=0;
+        
+        wait(1);
+        
+        motor1=0;
+        motor2=0;
+        motor3=0;
+        motor4=0;
+        
+        wait(1);
+        
+        motor1=0;
+        motor2=0.2;
+        motor3=0;
+        motor4=0.2;
+        
+        wait(1);
+        
+        motor1=0;
+        motor2=0;
+        motor3=0;
+        motor4=0;
+        
+        wait(1);
+        
+        led = 1;
+        printf("print\n\r");
+    }
+
+    /*while(1){
+        printf("a\n\r");
+        }*/
+
+
+}
\ No newline at end of file
diff -r 000000000000 -r 247c31683f0b mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Nov 21 08:17:05 2020 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/a7c7b631e539
\ No newline at end of file