Go Down

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

Helnar89

hi,
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

Quote
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.

Helnar89

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 ?



anachrocomputer

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.

Helnar89

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

C:/gebruikers/helnar/documenten/ontvangen/horrormovieambiance.mp3

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 ?

mircho

You can use something like this:
http://www.mikmo.dk/gobetwino.html
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...
http://processing.org/discourse/yabb2/YaBB.pl?num=1159134611

Go Up