Skip to content

Commit b4f5688

Browse files
committed
edit the I2S - simple tone example
1 parent 6a9d403 commit b4f5688

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: libraries/ESP_I2S/examples/Simple_tone/Simple_tone.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
#include <ESP_I2S.h>
3232

3333
// In fact, the GPIO pins are not fixed, most other pins can be used for the I2S function.
34-
#define LRC 25
35-
#define BCLK 5
36-
#define DIN 26
34+
#define I2S_LRC 25
35+
#define I2S_BCLK 5
36+
#define I2S_DIN 26
3737

3838
const int frequency = 440; // frequency of square wave in Hz
3939
const int amplitude = 500; // amplitude of square wave
@@ -54,7 +54,7 @@ void setup() {
5454
Serial.begin(115200);
5555
Serial.println("I2S simple tone");
5656

57-
i2s.setPins(BCLK, LRC, DIN);
57+
i2s.setPins(I2S_BCLK, I2S_LRC, I2S_DIN);
5858

5959
// start I2S at the sample rate with 16-bits per sample
6060
if (!i2s.begin(mode, sampleRate, bps, slot)) {

0 commit comments

Comments
 (0)