Page 1 sur 1

Mémoire - Problem install on Mega 2560

Message non luPosté: Mer 26 Oct 2011 08:57
de voidstar
Hi everybody :D , I have buy the mémoire shield and it's work fine on my arduino uno :) RTC and SD is ok.
But now for my project i want use arduino mega 2560 ... and there are some problem... i have follow your step, cut jumpers etc etc
and test the new contact but both rtc and sd dont't work.
For RTC i have used the your example but the result is 0 0 0 0 0 yesr month day....
i have als triedwith adafruit library RTCDS1307 but the result is the same

For sd i have used your example ( datalogger) i change chipselect 4 with 53 but the result is card is not present :(

I verify the contact
N°10 -> pin 53
N°11 -> pin 51
N°12 -> pin 50
N°13 -> pin 52
and this is ok.... do you have any idea?

thanks best regard!

ciao ciaooo


Re: Mémoire - FAQ & Guide

Message non luPosté: Mer 26 Oct 2011 09:47
de Lionel
Hi voidstar

For SD writing, check you follow all the above steps, It should work
would you please join a picture with your jumpers

For RTC, I just forgot to mention that you need to link (using jumper wires M/M)
analog pin 4 (mémoire) with digital pin 20 (Mega 2560)
analog pin 5 (mémoire) with digital pin 21 (Mega 2560)

I just check on an arduino mega2560 (adk), see below (click on the picture to see it full)

IMG_0215.JPG (147.58 Kio) Vu 10441 fois

Check each function and keep me in touch !

Re: Mémoire - Problem install on Mega 2560

Message non luPosté: Jeu 27 Oct 2011 07:46
de voidstar
Great! It'is work very well thank you opsss merci :D

For sd i post the photo with'i s ok?

I used this sketch....but the output is card is not present :(

Ciaooo Marco

Code: Tout sélectionner
#include <SD.h>

[b]const int chipSelect = 53;[/b]

void setup()
  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(10, OUTPUT);
  // see if the card is present and can be initialized:
  if (!SD.begin(chipSelect)) {
    Serial.println("Card failed, or not present");
    // don't do anything more:
  Serial.println("card initialized.");

void loop()
  // make a string for assembling the data to log:
  String dataString = "";

  // read three sensors and append to the string:
  for (int analogPin = 0; analogPin < 3; analogPin++) {
    int sensor = analogRead(analogPin);
    dataString += String(sensor);
    if (analogPin < 2) {
      dataString += ",";

  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  File dataFile ="datalog.txt", FILE_WRITE);

  // if the file is available, write to it:
  if (dataFile) {
    // print to the serial port too:
  // if the file isn't open, pop up an error:
  else {
    Serial.println("error opening datalog.txt");

Re: Mémoire - Problem install on Mega 2560

Message non luPosté: Jeu 27 Oct 2011 09:26
de Lionel

I just use your code (copy/paste) with my Arduino mega, memoire, a SD card and it's working without problem with this pinout.

Would you please check
Wires are correctly inserted inside the header ?
SD card is still ok ?

Re: Mémoire - Problem install on Mega 2560

Message non luPosté: Jeu 27 Oct 2011 09:49
de voidstar
mmm i have checked the wires with my tester and it's ok. The sd work with my pc is 16mb sd. I can tray with another sd but the same sd with arduino uno works fine :(