First, I'd like to say I'm quite new to working with electronics and programming; in fact, my specialization in university and graduate school was microbiology, and not anything to do with computers/electronics.

That being said, I have good computer knowledge (building/Windows OS/networking), but have very little actual programming knowledge (did a little bit of Pascal back in the day...)

Needless to say, the Arduino IDE (from what I understand, an extension of C++) is quite intimidating, but I've managed to work my way through some of the more basic examples, and am working on trying to get a more complicated project.

Right now, I'm trying to get a DS1307 breakout board working, but for the life of me, can't seem to get it to work. Hardware wise, I have it connected to an Arduino Mega 2560.

The Vcc is connected to the 5V pin, the ground to ground, SDA to SDA and SCL to SCL. I have tried with and without pull up resistors (connected between 5V-SDA and 5V-SCL).

Using the Adafruit library (https://github.com/adafruit/RTClib) and the following code, I can get the RTC to work just fine.

// DS1307_Serial_Easy (C)2010 Henning Karlsen// web: http://www.henningkarlsen.com/electronics//// A quick demo of how to use my DS1307-library to // quickly send time and date information over a serial link//

#include <DS1307.h>

// Init the DS1307DS1307 rtc(20, 21);

void setup(){ // Set the clock to run-mode rtc.halt(false);

// Setup Serial connection Serial.begin(9600);

// The following lines can be commented out to use the values already stored in the DS1307 //rtc.setDOW(SUNDAY); // Set Day-of-Week to SUNDAY //rtc.setTime(12, 0, 0); // Set the time to 12:00:00 (24hr format) //rtc.setDate(3, 10, 2010); // Set the date to October 3th, 2010}

One might wonder why not just use the Adafruit library and coding, and not Henning Karlsen's, but that is because the other project I am working on is based around his libraries and recoding it would be too big of a hurdle for me right now.

Sorry - missed the point that you were using a Mega.Maybe lose the comment?

I've removed the confusing comment that was in the coding; it's strange how some other libraries (Adafruit, Matt Joyce's old library that compiles in pre-1.0 Arduino IDE) work seemingly without problem.

The only difference that I can discern is that the other libraries use Wire.h whereas Karlsen decides to forgo using Wire.h.

RTClib\RTClib.cpp.o: In function `date2days':C:\Arduino-1.0.3\libraries\RTClib/RTClib.cpp:26: multiple definition of `i'Project_1.cpp.o:(.bss.i+0x0): first defined herec:/arduino-1.0.3/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitionsc:/arduino-1.0.3/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Warning: size of symbol `i' changed from 1 in Project_1.cpp.o to 2 in RTClib\RTClib.cpp.o

I haven't the faintest clue how to fix this.

I am wondering if it might be easier just to figure out what is going on with the Karlsen library...