Forgive me for asking this, I'm just recently learning about SPI and I2C. But can I use an I2C device (specifically an accelerometer e.g. ADXL345) together with this library? My plan is to play a sound based on the accelerometer's inputs.

The audio lib uses a timer and the hardware SPI. I2C is often a different hardware in uC, so I2C should still work beside the audio lib. For additional SPI devices also software-SPI might be an option and that way it should be possible to run SPI devices on pins not already used by the audio lib as well. So just give it a try.

1: I don't know if the lib work with ATmega324 and I don't know Arduinos with that processor. The typical processor is ATmega328.

2: Have you use level-shifters or does your Arduino run with 3.3V only? If the Arduino is 5V you need level-shifters or you could broke your SD card. The simplest way to build a level-shifter is using two resistors for every of the four input pins at the SD card. A description can be found in file SimpleSDAudio.h.

3: You have to power the SD card as well - connect GND to pin 3 and 6 of SD-card and connect pin 4 to the 3.3V output of the Arduino.

4: If there is no sound try the example BareMinimumWithDebug first and look at the output from the serial port. This can give you an indication if your wiring is still wrong or if there is something wrong with the filesystem on card or the file. You can post this output here in the forum to get more help.

1: I don't know if the lib work with ATmega324 and I don't know Arduinos with that processor. The typical processor is ATmega328.

It is sold here. http://www.e-gizmo.com/KIT/gizduino+%20164,324,644.html

Quote

2: Have you use level-shifters or does your Arduino run with 3.3V only? If the Arduino is 5V you need level-shifters or you could broke your SD card. The simplest way to build a level-shifter is using two resistors for every of the four input pins at the SD card. A description can be found in file SimpleSDAudio.h.

It has 3.3V. No need for level shifters.

Quote

3: You have to power the SD card as well - connect GND to pin 3 and 6 of SD-card and connect pin 4 to the 3.3V output of the Arduino.

Did that already.

Quote

4: If there is no sound try the example BareMinimumWithDebug first and look at the output from the serial port. This can give you an indication if your wiring is still wrong or if there is something wrong with the filesystem on card or the file. You can post this output here in the forum to get more help.

It failed the first test. And I am not certain where to connect the cs pin. Digging the datasheet of 328 and 324 does not help. I am having a hard time understanding both.

After connecting the SPI pins on corresponding pins, CS to pin 4, 100 ohm resistor to pin 10 and then the speaker, I tried measuring the 3.3 volt supply from the board and it went up to 4.3 volt. I think it's not normal. What might be the cause?

I directly connected the MOSI, MISO, and SCK of the SD card to the MOSI, MISO, and SCK of my arduino.I also directly connected the VCC pin of my SD card to the 3.3V of the arduino.After connecting everything, I checked the voltage at the 3.3V pin of my arduino.I used a fluke to measure the voltage. I got a reading of 4.3 volts.

I'll try the 100uF. It might work.Also, I'll try connecting the audio out to pin 9.

Hi, I looked over the Gizdino+ schematic: It runs on 5V, so you need level-shifters and you should test the 3v3 pin before with a multimeter to ensure that at least there is 3.3v. Second, the gizdino+-thing has sanguino pinmap, but datasheet says that there is a mapping for arduino-compatibility. Whatever, in the end you must ensure that the hardware spi pins are connected correctly to the card, so mosi to mosi, miso to miso, clk to clk and cs to pin 4 - but i dont know if in arduino or sanguino or gizdino numbering. Even if that is all correct i dont know if it will work because that clone is not very compatible to arduino. better go for the real one - at least take one with the correct cpu. the gizdino-non-plus version may work, but beware - the statement that it is 3.3v seems to be a bad typo to me...

I directly connected the MOSI, MISO, and SCK of the SD card to the MOSI, MISO, and SCK of my arduino.I also directly connected the VCC pin of my SD card to the 3.3V of the arduino.After connecting everything, I checked the voltage at the 3.3V pin of my arduino.I used a fluke to measure the voltage. I got a reading of 4.3 volts.

I'll try the 100uF. It might work.Also, I'll try connecting the audio out to pin 9.

I believe you are referring to the outputs/pins....

but this does NOT mean your board runs on +3.3v logic level..

example the Arduino UNO has +5v & +3.3v output pins....

however the boards runs on +5v logic... (even though there is a regulator outputting +3.3v on a pin or two)

I have tested/used this library on custom boards, Uno/Duemilanove (+5v).. and even minimal Arduino circuits running on +3v, 8Mhz internal clock (ie: no crystal no caps..etc)

First thing is to get an SD shield that properly works with your set-up..

Hi,is it so hard to believe that your board is running on 5V and not on 3.3V even that #*&! website says something different? That you measured the 3.3V line at 4.2V is a sign that your SD card is fighting a deathly battle against the 5V. What happens is the following: The SD card is connected to 3.3V at VCC, but at 5V at one of the other pins. An internal protection diode in the card tries to clamp the excess voltage at the pin with 5V to the 3.3V supply, but that supply is also weak because the crapduino uses some 3.3V from the USB-seriell-converter chip instead of a powerful extra regulator. This way the 3.3V regulator looses the battle and its output voltage rises to 5V minus the typical diode foreward-voltage of 0.7-0.8V = 4.2V. This is not how it should be done! You can destroy your AVR, the USB-Seriell-Converter or the SD card. I don't know how long this battle can take place and who will win, but you might have already broken something. Hint: Try if your SD card still works within a PC before spending more time frying stuff...