配列を使用し記憶走行を行う

Dependencies:   mbed AQM0802 CRotaryEncoder TB6612FNG

Revision:
2:a28ca7c25ed1
Parent:
1:19e2241a7aa7
Child:
3:e455433c8cae
--- a/main.cpp	Mon Aug 26 04:55:44 2019 +0000
+++ b/main.cpp	Mon Aug 26 04:57:20 2019 +0000
@@ -18,7 +18,7 @@
      while(1)
     {
          enc_count_a=encoder_a.Get();   //エンコーダパルス数を取得
-         enc_count_b=encoder_b.Get();
+         enc_count_b=-encoder_b.Get();
          distance_a=(enc_count_a*PULSE_TO_UM)/1000;    //移動距離をmm単位で格納
          distance_b=(enc_count_b*PULSE_TO_UM)/1000;    
          PC.printf("dis_a:%d   dis_b:%d\r\n",distance_a,distance_b);//表示