From a9ba272657183646b3b124707fc386ca06e0f07f Mon Sep 17 00:00:00 2001 From: kou029w Date: Sat, 15 Sep 2012 13:24:31 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- arduino/hanzo2_1/hanzo2_1.ino | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arduino/hanzo2_1/hanzo2_1.ino b/arduino/hanzo2_1/hanzo2_1.ino index cbd7326..6306d3c 100644 --- a/arduino/hanzo2_1/hanzo2_1.ino +++ b/arduino/hanzo2_1/hanzo2_1.ino @@ -159,9 +159,9 @@ int checkMarker(byte sensor){ return mode; } -void motorMode(byte motorLeftMode, byte motorRightMode, byte motorLeftSpeed, byte motorRightSpeed){ - motorL.mode( motorLeftMode, motorLeftSpeed); - motorR.mode(motorRightMode, motorRightSpeed); +void motorMode(byte leftMode, byte rightMode, byte leftSpeed, byte rightSpeed){ + motorL.mode( leftMode, leftSpeed); + motorR.mode(rightMode, rightSpeed); } void handle(int degree){ @@ -197,7 +197,7 @@ void sensorInit(){ } byte sensorRead(){ - byte sensor = 0; + byte sensor = 0; //黒が1、白が0 if(digitalRead(PIN_SENSOR_0)) sensor += 0b00000001; if(digitalRead(PIN_SENSOR_1)) sensor += 0b00000010; if(digitalRead(PIN_SENSOR_2)) sensor += 0b00000100; @@ -239,10 +239,10 @@ void setup() { void loop(){ /* センサーを見る */ - byte sensor = 0; + byte sensor = 0; //ラインが1、地面が0 #ifdef LINE_BLACK //黒ライン sensor = sensorRead(); -#else +#else //白ライン sensor = ~sensorRead(); #endif count(); //ロータリーエンコーダーの変化を見る