Mach das ... mal

hallo alle zusammen ich hab da ein Problem, ich möchte das der arduino eine Sache ... oft mal macht, in meinem fall 50 mal nun weiß ich nicht ob es diese Funktion gibt oder wie man sie einprogrammiert.
Ich freue mich auf antworten.

LG Leon.S

Willkomen

Try this

void loop()
{
  static uint8_t counter = 0;
  
  if ( counter < 50 )
  {
    Serial.println( counter++ );
  }
}

Und wenn du das Vorgeschlagene in eine eigene Funktion packst, dann kannst du diese Routine aus dem Setup (einmalig) oder über Parameter aus der loop beliebig oft starten.

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