masato yasuhara / Mbed 2 deprecated sekkeiseisaku_week3

Dependencies:   mbed QEI

Revision:
3:809e6c637f91
Parent:
2:fdd8a3074d79
diff -r fdd8a3074d79 -r 809e6c637f91 main.cpp
--- a/main.cpp	Fri Sep 20 09:05:47 2019 +0000
+++ b/main.cpp	Fri Oct 25 03:51:06 2019 +0000
@@ -25,18 +25,19 @@
         
         //エンコーダ値格納用変数
         static double y;
+        static double x;
         
         //エンコーダの値(生)の取得
         y=(double)wheel.getPulses();
         
         //エンコーダの値を角度に変換
-        y=y*360/(ROTATE_PER_REVOLUTIONS);
+        x=y*360/(ROTATE_PER_REVOLUTIONS);
         
         //エンコーダ値(角度)の表示(TeraTerm)
-        printf("%f\r\n",y);
+        printf("%f\r\n",x);
         
         //待機時間(1ミリ秒)
-        wait(delt_ms);
+        wait_ms(delt_ms);
 
     }