I have an SD Card Shield from seeed studio attached to my Arduino Uno board. I also have an SD card with a siren .MP3 file in it. I want my Arduino board to play the MP3 file but I am not sure how to get it to do that. I have a speaker connected as well.
As mentioned the Arduino is not able to decode MP3's. As an alternative you could convert the MP3 to the less cpu intensive WAVe file format then use Adafruit's Wave library to play the file out a pin.
Or you can use the VS1053 Co-Processor Shield to play the MP3 file.
The Arduino Uno does not have enough power to play MP3s in software. You will need to get a separate hardware MP3 decoder and instruct it to play them instead.
There is a new Library that will play WAV files. It can be found at https://github.com/TMRh20/TMRpcm
Related
I'm interested in which fingerprint scanner to use in a project with arduino or raspberry pi. This scanner MUST ONLY take the picture of the fingerprint and not to process neither validate the fingerprint because all of this will be done in a computer.
You can try an R305 module. It is one of the more popular modules with communication over UART. Adafruit has an existing library though it does not cover image download. However, there's substantial documentation that contains all the commands including the command for extracting the images you need. An image is usually a sort of compressed 256x288 grayscale BMP and is typically 37kB in size. You'll need to extrapolate to get the complete 74kB image. You should keep in mind that the maximum baud rate is 115200 or 11.5kB/s so it will take about 4 seconds to download an image before you can begin processing it. An Arduino would be unreliable at that baud rate too.
Another module that is completely compatible with the R305 is the FPM10 module; all the commands are the same and they are easily interchangeable. Here's a tutorial that can help.
For a project that I am doing I am trying to essentially convert an mp3 file into vibrations. I have talked to staff at SparkFun Electronics who set me up with the Lilypad Vibe Board and the Arduino Uno. It is in my understanding that with the Arduino Uno its unable to read an MP3 file and convert it into PWM so that the Lilypad Vibe Board can produce the vibrations. Does anyone know if there is any code or another device that will allow me to do this? I have researched the Raspberry Pi but am also unsure as to if this will work in the way i would like it to work. Any help would be greatly appreciated. My aim is to take an mp3 file, convert it into PWM so that the Lilypad Vibe Board would be able to create the vibrations in relation to the mp3 file.
I want to use ATmega2560 MC, but it manufactured only as surface mount IC which means i must make PCB to use it. I searched for a per-made kit and found Arduino Mega R3 board contains the desired MC. (It contains less I/O pins but that's OK for now). Can i implement my code (without any arduino code) in this board? or should i modify it to work with Arduino, also if it runs in the board will it be the same as normal IC or there will be differences in speed.
The MCU in the Arduino Mega2560 is a stock ATmega2560. There is no need to use the Arduino libraries to program it and no need to use the Arduino tools to communicate with it; avr-gcc and avrdude will work with it as normal. Note that you will need to select the appropriate programmer/protocol in avrdude for the bootloader programmed on the chip if you want to program it via serial rather than ISP.
I downloaded USB host shield code from the following website:
https://github.com/felis/USB_Host_Shield_2.0/archive/master.zip.
This contains too many files to which one I have to include for my application.
I want to know if USB host shield can be mounted to work in Arduino Uno. If yes can anybody provide me sample code to read SD card text file using USB host shield for Arduino Uno ?
I suppose that by "reading a SD card text file" you mean plug a SD card in a SD-USB adapter and then reading the file from it.
If so, there should be an example in the library called testusbhostFAT (here you will find the online version) where they read files stored in a FAT HDD (and I think that SD-USB adapters are seen as HDDs or FDDs).
Anyway they explicitly say that
This will not run a Arduino Uno due to the limited ram available in the ATmega328p.
By looking at the code maybe you will manage to slim it enough to run it on a Uno, but... Well, probably it's a bit hard.
Bye
I'm using the Arduino Ethernet Pro board and MP3 player shield from Sparkfun (http://www.sparkfun.com/products/10536 and http://www.sparkfun.com/products/10628)
I tried to use the examples provided by Sparkfun but i keep running in to the same errors, which i have nailed down to initializing the SD Card (I'm using the SdFat).
To nail down the core issue i tried running the "SdInfo" example from the SdFat library. This is my output:
SdFat version: 20111205
type any character to start
card.init failed
SD errorCode: 0X1
SD errorData: 0X0
If i change SS_PIN from 9 to 10 in Sd2PinMap.h per Sparkfun instructions (http://www.sparkfun.com/tutorials/295) the sdcard.init(...) method just hangs.
I think the issue is because of a conflict between the W5100 ethernet chip and the MP3 player shield.
Is there any conflicting ports that i am unaware of? Or do i need to disable the W5100 chip?
What size SD card are you using? (try using a SD card that is <4GB for compatibility )
You dont need to change it to pin 10 according to the schematic Sparkfun have posted.
Also looking at the sparkfun page have you tried this? madsci's Library
and also try this init command in the declarations card.init(SPI_FULL_SPEED, 9)
.. let me know how that works for you
-Ralim
You have chip-select conflicts with all of the SPI devices you're using. The "Quick Start" guide on SparkFun for the MP3 shield discusses how to change the SD library to work with the MP3 shield. You need to make similar changes so that you can use yet another CS pin with the MP3 shield, and leave 9 and 10 for the SD card and W5100.
When using multiple SPI devices, it's best to list the CS pins out. When you add a new SPI device, as with the MP3 shield, you'll be able to see which pins are already doing what.