char myID, x;
char Str0[3] = {'A','0'};
char Str1[3] = {'A','1'};
char Str2[3] = {'A','2'};
char Str3[3] = {'A','3'};
char Str4[3] = {'A','4'};
char Str5[3] = {'A','5'};
char Str6[3] = {'A','6'};
char Str7[3] = {'A','7'};
char Str8[3] = {'A','8'};
char Str9[3] = {'A','9'};
if (Serial.available() >0)
{
myID = Serial.read();
if (myID == Str0)
{
Serial.print(myID); // digit 0
digitalWrite(2, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(3, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(4, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(5, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(6, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(7, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(8, LOW); // turn the LED on (HIGH is the voltage level)
delay(1000);
}
please help.