Skip to content

Library Manager installs wrong Version of ESP32-audioI2S #6133

@cattledogGH

Description

@cattledogGH

Describe the problem

The library manager installs version 3.0.13. There is a bug with this version documented in
https://forum.arduino.cc/t/error-when-audio-h-added-to-sketch/1369212.

The library manager should be including 3.0.12 which is the latest release.

To reproduce

Install ESP32 -audioI2S from the library manger and run this file

#include <Adafruit_NeoPixel.h>
#include <Audio.h>
#include <MFRC522v2.h>
#include <MFRC522DriverSPI.h>
#include <MFRC522DriverPinSimple.h>
#include <MFRC522Debug.h>

// Led Setup
#define PIN 12
#define PIN2 13

Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel strip2 = Adafruit_NeoPixel(12, PIN2, NEO_GRB + NEO_KHZ800);

// SPI and RFID setup
MFRC522DriverPinSimple ss_pin(5);  // Create pin driver. See typical pin layout above.

#define RST_PIN 15
#define SPI_MOSI 23  // SD Card
#define SPI_MISO 19
#define SPI_SCK 18

SPIClass &spiClass = SPI;  // Alternative SPI e.g. SPI2 or from library e.g. softwarespi.

const SPISettings spiSettings = SPISettings(SPI_CLOCK_DIV4, MSBFIRST, SPI_MODE0);  // May have to be set if hardware is not fully compatible to Arduino specifications.

MFRC522DriverSPI driver{ ss_pin, spiClass, spiSettings };  // Create SPI driver.

MFRC522 mfrc522{ driver };  // Create MFRC522 instance.

void setup() {
  Serial.begin(115200);  // Initialize serial communications with the PC for debugging.
  while (!Serial)
    ;                  // Do nothing if no serial port is opened (added for Arduinos based on ATMEGA32U4).
  mfrc522.PCD_Init();  // Init MFRC522 board.
    // LED
  strip.begin();
  strip2.begin();
  strip.setBrightness(15);
  strip2.setBrightness(15);
  strip.show();   // Initialize all pixels to 'off'
  strip2.show();  // Initialize all pixels to 'off'
}

// Fill the dots one after the other with a color
void colorWipe(uint32_t c, uint8_t wait) {
  for (uint16_t i = 0; i < strip.numPixels(); i++) {
    strip.setPixelColor(i, c);
    strip.show();
    delay(wait);
  }
}

void colorWipe2(uint32_t c, uint8_t wait) {
  for (int i = strip2.numPixels(); i >= 0; i--) {
    strip2.setPixelColor(i, c);
    strip2.show();
    delay(wait);
  }
}

void loop() {
  if (!mfrc522.PICC_IsNewCardPresent() || !mfrc522.PICC_ReadCardSerial()) {
    return;
  }
  Serial.print("Card UID: ");
  //MFRC522Debug::PrintUID(Serial, (mfrc522.uid));
  //Serial.println();

  // Save the UID on a String variable
  String uidString = "";
  for (byte i = 0; i < mfrc522.uid.size; i++) {
    if (mfrc522.uid.uidByte[i] < 0x10) {
      uidString += "0";
    }
    uidString += String(mfrc522.uid.uidByte[i], HEX);
  }
  Serial.println(uidString);
  if (uidString == "93abe51a") {
    Serial.println("Access Granted Pink");
    colorWipe(strip.Color(0, 255, 0), 60), colorWipe2(strip2.Color(0, 255, 0), 60);
    colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);


  }

  else if (uidString == "187a3999") {
    Serial.println("Access Granted Grey");
    colorWipe(strip.Color(0, 0, 255), 60), colorWipe2(strip2.Color(0, 0, 255), 60);
    colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);


  } else {
    Serial.println("Access Denied");
    colorWipe(strip.Color(255, 0, 0), 60), colorWipe2(strip2.Color(255, 0, 0), 60);
    colorWipe(strip.Color(0, 0, 0), 1), colorWipe2(strip2.Color(0, 0, 0), 1);
  }
}

Expected behavior

should compile without error. It compiles successfully with library version 3.0.12

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • My report contains all necessary details

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions