Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of 2016_Spring_kaida by
Diff: KaidaKari.cpp
- Revision:
- 16:ea0808fbbb40
- Parent:
- 15:5e973e6c058c
- Child:
- 17:efe67bbb927e
diff -r 5e973e6c058c -r ea0808fbbb40 KaidaKari.cpp
--- a/KaidaKari.cpp	Thu Jun 09 02:53:48 2016 +0000
+++ b/KaidaKari.cpp	Fri Jun 10 04:49:54 2016 +0000
@@ -93,19 +93,8 @@
      */
 
 //motor
-    if( LSY > 140 && (ButtonState >> BUTTONLANALOG)&1 == 1) {
-        motorRightOne = 0.8;
-        motorRightTwo = 0;
-        motorLeftOne = 0.8;
-        motorLeftTwo = 0;
 
-    } else if( LSY < 110 && (ButtonState >> BUTTONLANALOG)&1 == 1) {
-        motorRightOne = 0;
-        motorRightTwo = 0.8;
-        motorLeftOne = 0;
-        motorLeftTwo = 0.8;
-
-    } else if(  LSY > 140 ) { //forward
+    if(  LSY > 140 ) { //forward
         motorRightOne = 0.4;
         motorRightTwo = 0;
         motorLeftOne = 0.4;
@@ -133,18 +122,16 @@
         motorRightOne = 0.4;
         motorRightTwo = 0;
         motorLeftOne = 0;
-        motorLeftTwo = 0.4
-        ;
-
+        motorLeftTwo = 0.4;
     }
 
 //arm
 
-    if(  (ButtonState >> BUTTONL2)&1 == 1 ) {
+    if(  (ButtonState >> BUTTONUP)&1 == 1 ) {
         armOne = 0;
         armTwo = 1;
         armRight = 0.8;
-    } else if( (ButtonState >> BUTTONR2)&1 == 1 ) {
+    } else if( (ButtonState >> BUTTONDOWN)&1 == 1 ) {
         armOne = 1;
         armTwo = 0;
         armRight = 0.4;
@@ -167,23 +154,8 @@
         armThree = 0;
         armFour = 0;
         armLeft = 0;
-    }
 
-
-    if(( ButtonState >> BUTTONPS)&1 == 1) {
-
-        motorRightOne = 0;
-        motorRightTwo = 0;
-        motorLeftOne = 0;
-        motorLeftTwo = 0;
-        armOne = 0;
-        armTwo = 0;
-        armThree = 0;
-        armFour = 0;
-        
-        wait(1);
-
-    }
+    
     /*
     With oen if, put both arms and legs.
 
@@ -192,11 +164,9 @@
 
     */
 
-    //データ取得例
+
 
-    if((ButtonState >> BUTTONCIRCLE)&1) {
-        //○が押されたとき
-    }
+
 
     /*
         led3=ButtonState & 0x0400;  //L1の状態
    