I am sorry to take your time but I really need your help.
I am new in arduino world and I cannot seem to work my Deek-Robot Data Logging Shield v1.0 with my arduino mega.
Should I connect the 10,11,12,13 of the data logger to 10,11,12,13 of the arduino mega or should I connect it in 50,51,52,53?
I tried both but it was unable to detect my SD Card.
My SD Card is 8GB and FAT32.
I need some help.
Thank you!
Please post your full sketch. If possible you should always post code directly in the forum thread as text using code tags (</> button on the toolbar). This will make it easy for anyone to look at it, which will increase the likelihood of you getting help. If the sketch is longer than the forum will allow then it's ok to add it as an attachment.
Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor then you will not have access to this useful tool. I recommend using the standard Arduino IDE instead.
When your code requires a library that's not included with the Arduino IDE please always post a link(using the chain link icon on the toolbar to make it clickable) to where you downloaded that library from or if you installed it using Library Manger(Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.
#include <SPI.h>
#include <SD.h>
File dataFile;
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
Serial.print("Initializing SD card...");
// make sure that the default chip select pin is set to
// output, even if you don't use it:
pinMode(SS, OUTPUT);
// see if the card is present and can be initialized:
if (!SD.begin(10, 11, 12, 13)) {
Serial.println("Card failed, or not present");
// don't do anything more:
while (1) ;
}
Serial.println("card initialized.");
}
void loop()
{
}
It looks like that's a super crappy shield that is not Mega compatible so you can't use hardware SPI with the shield plugged directly into the shield. Luckily the Adafruit SD library does support software SPI. Your current sketch is configured for the shield being connected on pins 10, 11, 12, 13, which is a reasonable guess, but apparently that's not working for you. It's more common for SD shields to use pin 4 for the CS pin so try changing this line:
I am using a lot of pins and one of the things I need is the SD card part.
I have LC Studio SD card adapter, unfortunately, I wasn't able to work it out.
I've searched about LC's card and found out that some, if not most, is defective so I assumed that it's defective.
I only have the LC Studio SD card and Deek-Robot data logging shield.
My Arduino Mega 2560 is working just fine, so I really don't know what's wrong.
If it is because of my SD Card components or my codes, but basically, I am using tutorials' code so it must work out.
However, since I'm a newbie I'm still trying to figure it out and I'm seeking for help.
Thanks by the way for giving me some of your precious time, I hope you'll bare with me.
I tried putting tried connecting the data logging shield with the arduino by wiring:
shield - mega
11 - 51
12 - 50
13 - 52
Hi,
This should solve the problem. On the Deek-Robot Logger you will find a SCL and a SDA solder point close to the power light on the upper side. Connect these points to your Arduino board's SCL and SDA. You will notice that the two solder points are in turn connected to A4 and A5 on underside of Deek shield, I suggest you cut the lines, easily done.
On the Deek Shield if you test for continuity from the DS1307 pins 5,6 you will have continuity to the solder points and not to the SDA, SCL pins that connect to the arduino. Bridge them and cut A4 and A5 tracks on underside.
On the Deek Shield if you test for continuity from the DS1307 pins 5,6 you will have continuity to the solder points and not to the SDA, SCL pins that connect to the arduino. Bridge them and cut A4 and A5 tracks on underside.
Hi James, I'm having this same problem. An arduino Mega and a RTC / SD shield from Deek-Robot (that works fine with a UNO).
How do you propose to connect the shield to the Mega?
Best regards
For anyone with Deek Robot to Mega connectivity issue, below is what I did.
I2C pins
Data Shield
Flip the board, cut away the bottom track just before it reaches the terminating point A4.
Cut away the track just before it reaches the terminating point A5.
Above steps keep the circuitry from DS1307 to SDA and SCL on the shield without going to Mega.
On top side, jump 2 wires from SDA & SCL holes ( near the A4&A5 pins ) to corresponding SDA & SCL holes ( near the switch ).
SPI pins
Data Shield
Tilt/bend pins 11,12,13 so that they will not insert into the female side on the Mega.
Use 3 male to male jumpers,
MOSI - pin 11 - Mega (51)
MISO - pin 12 - Mega (50)
CLK - pin 13 - Mega (52)
In the sketch, define the chip select pin as 10. Ex if (!SD.begin(10))
Basically with above steps, we can use examples of SD and RTC from the IDE.
Hope this can be helpful.
For anyone with Deek Robot to Mega connectivity issue, below is what I did.
I2C pins
Data Shield
Flip the board, cut away the bottom track just before it reaches the terminating point A4.
Cut away the track just before it reaches the terminating point A5.
Above steps keep the circuitry from DS1307 to SDA and SCL on the shield without going to Mega.
On top side, jump 2 wires from SDA & SCL holes ( near the A4&A5 pins ) to corresponding SDA & SCL holes ( near the switch ).
SPI pins
Data Shield
Tilt/bend pins 11,12,13 so that they will not insert into the female side on the Mega.
Use 3 male to male jumpers,
MOSI - pin 11 - Mega (51)
MISO - pin 12 - Mega (50)
CLK - pin 13 - Mega (52)
In the sketch, define the chip select pin as 10. Ex if (!SD.begin(10))
Basically with above steps, we can use examples of SD and RTC from the IDE.
Hope this can be helpful.
Brilliant - problem solved for me. Because I have an lcd/keypad shield on top, I didn't have access to the d11,d12&d13 sockets so I used male/female jumpers to connect the bent pins to the mega sockets