pschatzmann / ESP32-A2DP

A Simple ESP32 Bluetooth A2DP Library (to implement a Music Receiver or Sender) that supports Arduino, PlatformIO and Espressif IDF
Apache License 2.0
1.55k stars 261 forks source link

'I2S' was not declared in this scope #548

Closed renatoianhez closed 2 months ago

renatoianhez commented 2 months ago

Problem Description

In the bt_music_receiver_arduino_i2s example I receive this error: 'I2S' was not declared in this scope Before, I had to change the include to #include "driver/I2S.h"

Device Description

ESP32 WROVER Kit (all version), ESP32 Arduino 3.0.0-alpha3

Sketch

#include "driver/I2S.h"
#include "BluetoothA2DPSink.h"

BluetoothA2DPSink a2dp_sink(I2S);

void setup() {
    I2S.setSckPin(14);
    I2S.setFsPin(15);
    I2S.setDataPin(22); 
    if (!I2S.begin(I2S_PHILIPS_MODE, 44100, 16)) {
      Serial.println("Failed to initialize I2S!");
      while (1); // do nothing
    }

    a2dp_sink.start("MyMusic");
}

void loop() {
}

Other Steps to Reproduce

No response

Provide your Version of the EP32 Arduino Core (or the IDF Version)

3.0.0-alpha3

I have checked existing issues, discussions and online documentation

pschatzmann commented 2 months ago

With 3.0 the Arduino API is changing as well: Please use this example