Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!




Need Help With DfPl...
 
Share:
Notifications
Clear all

[Solved] Need Help With DfPlayerMini TF-16P

2 Posts
2 Users
0 Likes
968 Views
(@Anonymous)
Joined: 1 second ago
Posts: 0
Topic starter  

Hi Everyone!

I am doing a school project that is due very soon, and I am using DfPlayerMini TF-16P, an Arduino Uno and 2 buttons. I was trying to make it so that when I push one button it asks one question, and when I push the other one it asks a different question. I was wondering if anyone could please make me code that would work for this project. I have tried the code below but the code is not working. The buttons don't work, and there is no sound. I have attached my wiring diagram below (sorry if it is bad, this is my first time creating a circuit schematic)

 


   
ReplyQuote
Topic Tags
 Hans
(@hans)
Famed Member Admin
Joined: 11 years ago
Posts: 2660
 

Hi Scooter,

Welcome! 😊 

So when looking at your sketch and schematic - nicely done!

Note: I assume +5V and GND are properly connected to a power supply. You may need more power than your USB port is providing.

Usually with cases like these I'll start looking at some of the basic elements. Here that would be: using buttons, playing sound, and finally combining the two.

When looking at how you're using buttons, I do see two potential issues with how you're using buttons (see also Arduino Buttons).

1. Your code forgets to set the button pins as inputs in "setup ()";

pinMode(buttonPause, INPUT);
pinMode(buttonNext, INPUT);

 

2. You buttons may need to be wired a little bit different, even though the way you did it should do "something" already.

 

So I'd recommend getting the buttons to work without the MP3 part. Keep it simple, based on the Arduino example code.

Once that works, only make the audio part work.
And if that works as well: then combine them.

Feel free to ask for help 😊 


   
ReplyQuote

Like what you see and you'd like to help out? 

The best way to help is of course by assisting others with their questions here in the forum, but you can also help us out in other ways:

- Do your shopping at Amazon, it will not cost you anything extra but may generate a small commission for us,
- send a cup of coffee through PayPal ($5, $10, $20, or custom amount),
- become a Patreon,
- donate BitCoin (BTC), or BitCoinCash (BCH).

Share: