“:Test1/13/zh-hans”的版本间的差异
来自Labplus盛思维基百科
(导入新版本自外部来源) |
(没有差异)
|
2018年2月7日 (三) 15:39的最新版本
void loop() {
// put your main code here, to run repeatedly: a=digitalRead(find1Pin); b=digitalRead(find2Pin); Serial.println(a); Serial.println(b); if((a==1)&&(b==1)) { digitalWrite(motor1Pin,LOW); digitalWrite(motor2Pin,LOW); } if((a==1)&&(b==0)) { digitalWrite(motor1Pin,LOW); digitalWrite(motor2Pin,HIGH); } if((a==0)&&(b==1)) { digitalWrite(motor1Pin,HIGH); digitalWrite(motor2Pin,LOW); } if((a==0)&&(b==0)) { digitalWrite(motor1Pin,HIGH); digitalWrite(motor2Pin,HIGH); }
} </pre>