玉田機体ピン配置がサンプルとのピン配置が違う

Dependencies:   mbed i2c_gyro_mpu_6050 AQM0802 TB6612FNG

Revision:
1:b71b5722e3a1
Parent:
0:7767f80cd27b
Child:
2:7ca124b4dbcb
diff -r 7767f80cd27b -r b71b5722e3a1 main.cpp
--- a/main.cpp	Sat Jul 20 13:54:51 2019 +0000
+++ b/main.cpp	Mon Jul 22 09:48:09 2019 +0000
@@ -1,11 +1,11 @@
 //モータドライバTB6612動作検証用のサンプルプログラム
 //TB6612クラスを使用して、モータA,モータBのオブジェクトを生成する。
-//生成時のピン割当はマイコンピン割当通りに配置すること。(サンプルは適当に割りつけている。)
+//生成時のピン割当はマイコンピン割当通りに配置すること。
 #include "mbed.h"
 #include "TB6612.h"
 AnalogIn    ain(A0);            //モータ速度制御用アナログピン
-TB6612      motor_a(D2,D3,D4);  //モータA制御用(pwma,ain1,ain2)
-TB6612      motor_b(D5,D6,D7);  //モータB制御用(pwmb,bin1,bin2)
+TB6612      motor_a(D2,D7,D6);  //モータA制御用(pwma,ain1,ain2)
+TB6612      motor_b(D10,D8,D9);  //モータB制御用(pwmb,bin1,bin2)
 Serial      pc(USBTX,USBRX);    //USBシリアル通信用
 
 int main() {
@@ -13,7 +13,7 @@
     char    input_data;         //キーボード入力情報格納用
     while(1) {
         input_data=pc.getc();   //キーボード入力情報取得
-        motor_speed=ain.read(); //モータスピード情報取得
+        motor_speed=ain.read()/2; //モータスピード情報取得(低速運転させるため2分の1の値とする。)
         switch(input_data){
             case    '1':    motor_a=motor_speed;    //モータA正転
                             break;