Help with DFPlayer

    
    String A = Serial.readString();
    
    if(A == "On") {
        digitalWrite(LED_BUILTIN, HIGH);
        myDFPlayer.loop(1); 
        delay(10);
      
    }

I want to delay code.
How to?

Delay takes an argument in ms, so here you wait 10ms… that goes fast
If you want 10 seconds then use 10000

Can delays be used with loops?

Sure, but be careful what you wish for…

Read up on millis() timing. It will serve you well in the future.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.