Go Down

Topic: loading file (Read 1 time) previous topic - next topic


im new to this.
my teacher gave an asignment to do with the arduino.

Im having a bit trouble searching how to load a musicfile (mp3)
into the arduino.  

It should be activated when i press the button (and keeps looping ) and stop when i dont press the button

Can you help me ?

Coding Badly

Im having a bit trouble searching how to load a musicfile (mp3) into the arduino

It is very unlikely you will be able to squeeze an MP3 file into an Arduino.  Arduinos don't have very much memory.

Typically, you would use a "shield" or a PC to play an MP3 file.  The Arduino would handle the button.


yes, im using the pc to play the musicfile.

so what would a simpel code be?
to play the musicfile in a loop.
and to stop when the button is not pressed.

so that should be something with if, else,   and high & low input    right ?


If you want us to help you, you'll need to explain, very clearly, just what you've got (PC, shield, etc.) and exactly what you want to do.


i just got a windows PC,     n have the file in


I have a ATmega 168 arduino.
and got the pushbutton in digitalpin 7

what i want is:

When the button is pushed,    the file should B playing forever
When button is released the file stops playing.

is there more what i have to tell ?


You can use something like this:
The first two items of it's descriptions are:
# Start a program on the PC.
# Start a program, and wait until it finishes, and tell Arduino it finished.

Coding Badly

This looks helpful...

Go Up