数値を表示できるように変更

This commit is contained in:
Nebel 2013-10-24 01:41:45 +09:00
parent ee82cba921
commit a625579c73

View file

@ -7,7 +7,7 @@ void setup() {
servo1.attach(9);
servo2.attach(10);
Serial.begin(9600);
Serial.print("format : [0-180][ab]");
Serial.println("format : [0-180][ab]");
}
void loop() {
@ -21,10 +21,14 @@ void loop() {
v = v * 10 + ch - '0';
break;
case 'a':
Serial.print("Servo(9) :");
Serial.println(v);
servo1.write(v);
v = 0;
break;
case 'b':
Serial.print("Servo(10):");
Serial.println(v);
servo2.write(v);
v = 0;
break;