Go Down

Topic: control dc motor via ultrasonic distance module and L298 motor driver (Read 4196 times) previous topic - next topic


Someone PLease Help
It says duration is unspecified for the code above


It's defined as a local variable in the loop()
void loop() {
// and the distance result in centimeters:
long duration, cm;   // <==== HERE
pinMode(trigPin, OUTPUT);

Post YOUR code using code tags.
Please do not PM me for help,  others will benefit as well if you post your question publicly on the forums
Pas de messages priv├ęs SVP

Go Up