春ロボ1班(元F3RC4班+) / Mbed 2 deprecated F3RC-mbed-new2

Dependencies:   mbed move3wheel

Fork of F3RC-mbed-new by 春ロボ1班(元F3RC4班+)

Files at this revision

API Documentation at this revision

Comitter:
abcdefgh
Date:
Fri Apr 21 04:39:50 2017 +0000
Parent:
11:86d717718dbf
Child:
14:5c92c3c78290
Commit message:
ps3

Changed in this revision

AutoEvents.cpp Show annotated file Show diff for this revision Revisions of this file
User.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/AutoEvents.cpp	Mon Feb 15 02:23:25 2016 +0000
+++ b/AutoEvents.cpp	Fri Apr 21 04:39:50 2017 +0000
@@ -260,7 +260,7 @@
     fp = fopen("/local/data.p3b", "r");
     if(fp==NULL){
         fp = fopen("/local/data.p3b", "w");
-        fprintf(fp,"00:02:72:D0:82:F7");
+        fprintf(fp,"00:1B:DC:06:C7:C7");
         fclose(fp);
         fp = fopen("/local/data.p3b", "r");
     }
--- a/User.cpp	Mon Feb 15 02:23:25 2016 +0000
+++ b/User.cpp	Fri Apr 21 04:39:50 2017 +0000
@@ -9,7 +9,8 @@
 int RSX,RSY,LSX,LSY,BSU,BSL;
 //これより下に関数外に書く要素を記入する
 PwmOut led1(LED1);
-PwmOut led2(LED2);
+//PwmOut led2(LED2);
+DigitalOut led2(LED2);
 DigitalOut led3(LED3);
 DigitalOut led4(LED4);
 
@@ -42,15 +43,19 @@
     //ここより下にプログラムを書く
     //データ取得例
     
-    if((ButtonState >> BUTTONCIRCLE)&1) {
+    if((ButtonState >> BUTTONCIRCLE)&1 == 1) {
+        led2 = 1;
         //○が押されたとき
-    }
+    }else{
+        led2 = 0;
+        }
+    
    
         
-    led1=LSX/256.0f;
-    led2=LSY/256.0f;
-    led3=ButtonState & 0x0400;  //L1の状態
-    led4=ButtonState & 0x0800;  //R1の状態
+    //led1=LSX/256.0f;
+    //led2=LSY/256.0f;
+    //led3=ButtonState & 0x0400;  //L1の状態
+    //led4=ButtonState & 0x0800;  //R1の状態
     //値の取得はps3.hを参照
         
 }
\ No newline at end of file