Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: AdaFruit Audio Library doesn't support Metro M4 Airlift?

  1. #1
    Junior Member
    Join Date
    Jun 2021
    Posts
    2

    AdaFruit Audio Library doesn't support Metro M4 Airlift?

    I'm trying to get the Adafruit audio library working with my Metro M4 Express Airlift Lite. In two examples I've tried, WavFilePlayer and sketch_jun13a, I'm getting the same error:

    Code:
    Audio_-_Adafruit_Fork/input_adcs.cpp:161:2: error: #error The Adafruit audio library is compatible with M4 parts only
      161 | #error The Adafruit audio library is compatible with M4 parts only
    Beginning on Line 122 in input_adcs.cpp, the compiler goes through if/elif/else statements to detect the board variant (_VARIANT_ITSYBITSY_M4_, _VARIANT_FEATHER_M4_, etc.), and gets to the end without matching any of the supported boards.

    I think the board variant for the Metro M4 Express Airlift Lite is "ADAFRUIT_METRO_M4_AIRLIFT_LITE", but the compiler obviously doesn't think that _VARIANT_METRO_M4 on line 138-143 is true, otherwise the following would be called and the error "The Adafruit audio library is compatible with M4 parts only" on line 161 wouldn't get triggered:

    Code:
    #elif defined(_VARIANT_METRO_M4_)
       switch (pin1)
       {
          case PIN_A4: ADC1Channel = ADC_Channel0; break;
          case PIN_A5: ADC1Channel = ADC_Channel1; break;
       }
    Any help would be greatly appreciated.

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    4,100
    Ummm, you might be better asking on the Adafruit forums.

  3. #3
    Junior Member
    Join Date
    Jun 2021
    Posts
    2
    I did, but also posted here in case someone might have dealt with the same or a similar issue. Sorry, Iím pretty new to the Arduino world, but have built up a few Raspberry Pi kits, and have some experience with electronics and soldering.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,274
    Quote Originally Posted by jluros View Post
    I did, but also posted here in case someone might have dealt with the same or a similar issue. Sorry, I’m pretty new to the Arduino world, but have built up a few Raspberry Pi kits, and have some experience with electronics and soldering.
    Have had similar (non)response on their forum - it is nothing like the focus and attention here. Too many variants of hardware ( and software split : Arduino and python ) and in this case they ported the PJRC Audio library on some devices..

  5. #5
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,369
    I think the board variant for the Metro M4 Express Airlift Lite is "ADAFRUIT_METRO_M4_AIRLIFT_LITE", but the compiler obviously doesn't think that _VARIANT_METRO_M4 on line 138-143 is true,
    Then force the _VARIANT_METRO_M4 to be defined in the compiler preferences for that board?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •