Help needed with BMP180 and Adafruit data logger shield

Hi, I am a novice programmer and I am working on a set-up for a science project. I am using an Arduino Mega 2560 R3 with a BMP180 module and Adafruit Data Logger shield.

I am encountering some difficulty in the set-up, the serial port keeps printing that the SD card failed or was not present when I have already inserted the SD Card into the input on the shield. I would like to know if there is an error with my code (I am quite confused by the whole chipSelect thing for mega) or something I am not doing right regarding the connection of the set-up itself (whether I need to add jumper cables etc.) and how to solve this/these problem(s). Please refer to the attached:

All help is appreciated :slight_smile:

SDcard_BMP180_Code.ino (2.21 KB)

BMP180andDataLoggerShield.PNG

UPDATE:

I have found out that the SD Card cannot be initialised to begin with. I have researched online and sadly, none of them work for me.

The problem: The whole chipselect thing
I have tried numerous methods on both Arduino Uno and Mega and all I get is: initialization failed

If anyone has any suggestions or solutions they are greatly appreciated as I do not have much time to solve this issue (deadlines sigh...). Thank you for your attention <3

Hi,

I'm very new but worked on setting up a data logger yesterday (not from Adafruit).

Did you check out their tutorial?

You should unplug everything and make sure the data logger works on the Arduino by it self first. You can confirm the card works by running CardInfo sketch. This is in the IDE examples.

File->Examples->SD->CardInfo

Follow this part of the Adafruit tutorial.

Hope that helps.