Need some Christmas eve help with audio on a arduino based lightsaber project/


I'm trying to finish up some Christmas gifts, lightsabers I'm building using the DIYino board (DIYino - an Arduino compatible board for prop electronics - Products and Services - Arduino Forum),
which has:

  • an Atmega328P-AU (based on the Arduino Nano)
  • MPU-6050 6-axix accelero- and gyrometer for gesure/motion detection
  • YX5200-24SS Wav/MP3 decoder (same chipset as on the DFPlayer Mini)
  • SD card slot for music/sound files storage
  • 3W audio amplifier

So, I ordered the various parts I needed, including the DIYino boards, and got them in the nick of time. I've got them mostly assembled, but not getting any audio. I have the sdcards formatted and loaded with the WAV files, using instructions and code from here (GitHub - neskweek/LightSaberOS: Operating System for Arduino based LightSaber).

The DIYino boards had test code loaded on them when they arrived, and they would play a sound after soldering everything up before loading the new source and compiling. No compile errors, and transferred fine. Everything else seems to work, including the light on the blade, motion detection, etc. I do get an initial "click" from the 3W, 4ohm, speaker, and if you put your ear right up to it, you can hear a highpitched hum, which seems to correlate to the luxeon led on the blade.

I also tried replacing the speaker with some earbuds to make sure the speaker wasn't the issue, same result.

This is the output of the serial monitor:

Connecting to DFPlayer...
Connected to DFPlayer !

Not sure if I should be getting anything else.

Any help in troubleshooting this is greatly appreciated.

I figured out most of my problems. The libraries have to be configured "just so", and the documentation wasn't clear enough (to me). Had to replace some, rename some.

Anyway, I have sound now! Problem I have now, when you retract the blade, the hum sound continues for about another minute.