DFRobot ROB0118 Manuel - Page 11

Parcourez en ligne ou téléchargez le pdf Manuel pour {nom_de_la_catégorie} DFRobot ROB0118. DFRobot ROB0118 13 pages.

//
}
//
carBack(150,150);
}
void SensorSetup(){
pinMode(URTRIG,OUTPUT);
digitalWrite(URTRIG,HIGH);
pinMode(URPWM, INPUT);
and
for(int i=0;i<4;i++){
Serial.write(EnPwmCmd[i]);
}
}
int MeasureDistance(){
eading
digitalWrite(URTRIG, LOW);
digitalWrite(URTRIG, HIGH);
pulses
unsigned long distance=pulseIn(URPWM,LOW);
if(distance==50000){
Serial.print("Invalid");
}else{
distance=distance/50;
}
return distance;
}
void carStop(){
digitalWrite(speedPin_M2,0);
digitalWrite(directionPin_M1,LOW);
carAdvance(70,70);
Serial.println("carAdvance");
delay(100);
// a low pull on pin COMP/TRIG
//
// A low pull on pin COMP/TRIG
// Set to HIGH
// Sending Enable PWM mode comm
// reading Pin PWM will output
// the reading is invalid.
// every 50us low level stands for 1cm
Motor Stop
triggering a sensor r