Mémoire - Problem install on Mega 2560

Mémoire - Problem install on Mega 2560

Message non lude voidstar » Mer 26 Oct 2011 08:57

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

Marco
voidstar
 
Messages: 3
Inscription: Mer 26 Oct 2011 08:41

Re: Mémoire - FAQ & Guide

Message non lude Lionel » Mer 26 Oct 2011 09:47

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
IMG_0215.JPG (147.58 Kio) Vu 2879 fois


Check each function and keep me in touch !
Image - Distributeur officiel Arduino - Conception de shields
Avatar de l’utilisateur
Lionel
 
Messages: 734
Inscription: Mar 21 Déc 2010 09:52
Localisation: Toulouse

Re: Mémoire - Problem install on Mega 2560

Message non lude voidstar » Jeu 27 Oct 2011 07:46

Great! It'is work very well thank you opsss merci :D

For sd i post the photo with jumper...it'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.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(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:
    return;
  }
  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 = SD.open("datalog.txt", FILE_WRITE);

  // if the file is available, write to it:
  if (dataFile) {
    dataFile.println(dataString);
    dataFile.close();
    // print to the serial port too:
    Serial.println(dataString);
  } 
  // if the file isn't open, pop up an error:
  else {
    Serial.println("error opening datalog.txt");
  }
}
Fichiers joints
P1060871.JPG
P1060871.JPG (3.13 Mio) Vu 2866 fois
voidstar
 
Messages: 3
Inscription: Mer 26 Oct 2011 08:41

Re: Mémoire - Problem install on Mega 2560

Message non lude Lionel » Jeu 27 Oct 2011 09:26

Hello,

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 ?
Image - Distributeur officiel Arduino - Conception de shields
Avatar de l’utilisateur
Lionel
 
Messages: 734
Inscription: Mar 21 Déc 2010 09:52
Localisation: Toulouse

Re: Mémoire - Problem install on Mega 2560

Message non lude voidstar » Jeu 27 Oct 2011 09:49

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 :(
voidstar
 
Messages: 3
Inscription: Mer 26 Oct 2011 08:41


Retourner vers Support for Snootlab Products

Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 2 invités

cron