hey,
im trying to make a voice control robotic arm. i dont know why it is not working... plzz help me..
sketch_apr14b.ino (9 KB)
hey,
im trying to make a voice control robotic arm. i dont know why it is not working... plzz help me..
sketch_apr14b.ino (9 KB)
int pins[] = {
0,1,2,3,6,7,4,5};
Serial.begin(9600);
//set pins as inputs
for(int i=0; i<=7; i++)
{
pinMode(pins[i], INPUT);
}
Do you want to use pins 0 and 1 as INPUT or as Serial? Both is the wrong answer.
if(command == '01')
Single quotes are for single characters. Which ONE key did you press to get that ONE character in the quotes?
if(command == '01')
{
do
{
digitalWrite(c,HIGH);
digitalWrite(d,LOW);
digitalWrite(f,HIGH);
digitalWrite(e,LOW);
delay(500);
digitalWrite(d,HIGH);
digitalWrite(c,LOW);
digitalWrite(e,HIGH);
digitalWrite(f,LOW);
delay(500);
}
while(command != 's');
}
If the if test were, somehow, to evaluate to true, enter an infinite loop. Why?