ESP32 Bit Pirate home
  • General commands
  • Beginner
  • 3 min
  • Serial CLI

Recipe · Beginner · General commands

How to repeat commands

Use repeat to run a command multiple times, such as repeated scans or GPIO pulses during a quick bench test.

UART trigger pattern with captured response.
Repeat is the smallest automation primitive in the firmware CLI.
Step 1

Commands

These commands are documented as global or quick-start commands.

Result

What it means

If the command returns the expected output, the firmware and terminal session are ready for the next workflow.

Troubleshooting

  • Start with a small count such as repeat 3.
  • Use read-only commands first, for example scan.
  • If output floods the terminal, lower the count or add a delay.

Next steps

  • Try the same workflow on a known safe pin or target.
  • Save the useful command as a note or alias.
  • Move to the protocol-specific recipe once the basics work.

Repeat command FAQ

Which commands are good candidates for repeat ?

Good candidates are deterministic, short and low-risk: status reads, scans, measurements or lab-only commands where repeated side effects are expected and easy to review.

Can repeat replace a full automation script?

No. repeat is best for quick CLI loops. Use a Python or host-side script when you need parsing, conditional logic, file output or recovery from errors.

How do delays change repeat tests?

Delays make repeated commands easier to observe and reduce the chance that the target is still busy from the previous iteration. They also make serial logs easier to compare.

Go deeper