void setup()
{
for(int i=0;i<=7;i++) //把0-7设置为输入
pinMode(i,INPUT);
for(int j=8;j<=13;j++) //把8-13设置为输出
pinMode(j,OUTPUT);
}
void loop() {
if(digitalRead(1)==HIGH){
digitalWrite(9,HIGH);
digitalWrite(10,LOW);
}
if(digitalRead(2)==HIGH){
digitalWrite(10,HIGH);
digitalWrite(9,LOW);
}
if(digitalRead(3)==HIGH){
digitalWrite(9,LOW);
digitalWrite(10,LOW);
}
}