FeatherWing Music Maker does not allow the use of other actu

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
KevinLe
 
Posts: 11
Joined: Thu Mar 25, 2021 4:22 am

FeatherWing Music Maker does not allow the use of other actu

Post by KevinLe »

Hello,

I am contacting you because I have a problem with the "FeatherWing Music Maker w/ Amp - MP3" (https://www.adafruit.com/product/3436).
I would like to use it in combination with a neo pixel ring.
I would simply like to be able to play MP3 files and have the neo pixel ring blink when the music is playing.
The problem is that when the music is playing, no other function seems to be able to be activated in the "void loop ()".
In the example code "feather_player", I understand that background playback of an MP3 file is enabled in the "void setup()".
I don't understand why I can't activate any other function in the "void loop()" when playing an audio file.
Can you help me?

Best Regards,
Kevin

User avatar
mikeysklar
 
Posts: 14165
Joined: Mon Aug 01, 2016 8:10 pm

Re: FeatherWing Music Maker does not allow the use of other

Post by mikeysklar »

Kevin,

You can post your code if you like.

I have used this FeatherWing module before with interrupts enabled in setup and then calling the musicPlayer.start and stop routines from the main loop():

Code: Select all

  musicPlayer.useInterrupt(VS1053_FILEPLAYER_PIN_INT);

Code: Select all

                    musicPlayer.startPlayingFile("audiofile.mp3");
                    musicPlayer.stopPlaying();

This way I could play audio and run the lights at the same time all in the main loop.

User avatar
KevinLe
 
Posts: 11
Joined: Thu Mar 25, 2021 4:22 am

Re: FeatherWing Music Maker does not allow the use of other

Post by KevinLe »

Thank you very much!
I'll try that!
Best Regards,
Kevin

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”