ESP32 Bit Pirate home
  • I2S
  • Beginner
  • 3 min
  • Serial CLI

Recipe · Beginner · I2S

How to play an I2S test tone

Configure I2S pins and play a tone to verify BCLK, LRCK and DATA output wiring.

I2S audio signal between microphone and speaker.
A practical ESP32 Bit Pirate workflow based on the documented firmware commands.

Wiring View

BP BCLKI2S bit clockLRCK/WSI2S word selectDATAI2S data inputGNDGND
Generated from the wiring summary: to BP.
Step 1

Commands

Run the workflow from the CLI after selecting the matching mode.

Result

What it means

The output confirms that the protocol path is working and gives you a baseline for deeper experiments.

Troubleshooting

  • Swap LRCK and BCLK if there is no output.
  • Check sample rate and bit depth in config.
  • Use reset to return the I2S service to output mode.

Next steps

  • Run test speaker.
  • Try a microphone record workflow.
  • Use a logic analyzer if clocks are missing.

I2S test tone FAQ

What does play test on an I2S output?

It verifies that BCLK, LRCK and DATA are configured well enough for the DAC, amplifier or speaker module to receive a generated tone.

Why do I hear nothing even though the command runs?

BCLK and LRCK may be swapped, DATA may be on the wrong pin, the amplifier may be muted, or the module may need a different sample rate or bit depth from config.

Why use a short tone first?

A short command such as play 440 1000 gives a repeatable one-second check without leaving continuous audio running while you adjust wiring or gain.

Go deeper