2015 robotic contest arakawa A / Mbed 2 deprecated Nucleo_PS3_Jikken_new

Dependencies:   mbed

Fork of Nucleo_PS3_Jikken_XBEE by 2015 robotic contest arakawa A

Files at this revision

API Documentation at this revision

Comitter:
nodoame
Date:
Thu Nov 05 10:03:35 2015 +0000
Parent:
29:9cfd082de61e
Child:
31:d9c70bcdb54e
Commit message:
???????(PB_1)???????????????; ?????????;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Oct 30 08:38:18 2015 +0000
+++ b/main.cpp	Thu Nov 05 10:03:35 2015 +0000
@@ -236,6 +236,7 @@
     Green=0;Blue=0;Red=0;
     double gValue=0,bValue=0,rValue=0;
     DigitalOut l(PB_2);
+    DigitalOut l2(PB_1);
     int sqf=0;
     double deg=32;
     int val;
@@ -279,7 +280,7 @@
             else if(r){
                 //pc.printf("R\r\n");
                 pushF=true;
-                kRed=shotToDenziben(airReg,2,1,airAddr);
+                kRed=shotToDenziben(airReg,6,1,airAddr);
                 wait(shotWait);
                 kRed=shotToDenziben(airReg,0,1,airAddr);
                 //printf("shot:%d\r\n",i2cS=i2c.write(airAddr,cmd,2));
@@ -311,10 +312,12 @@
         //タッチセンサ
         if(((int)DATA[1]&12)==12&&!touchSF){
             touchSF=true;
+            l2=1;
             gValue=0.5;
         }
         else if(!(((int)DATA[1]&12)==12)){
             touchSF=false;
+            l2=0;
             gValue=0;
         }
         //お盆回し