Setting up DS1307 Real Time Clock Module

Hi everyone, I've been working on this for the past few days. I have successfully run both my stepper and 8 relay module but cant figure out how to integrate the real time clock into my project.
The goal is to have the arduino run the stepper motor signal every 12 hours. The stepper motor will act as an automated fish feeder for when Im on holiday. I also want the arduino to switch on certain relays for the light etc.
Is the RTC necessary?

My problems are:

1) when I plug in the real time clock my arduino stops flashing and appears to be off. The arduino program apparently still recognized the arduino on com4.

2) When I ran the set time file in the DS1307RTC library it did pop up on the sketch but I couldn't run it because the following error was found:

also the serial monitor was not showing me anything.

How to hook it up:
Solder wires to Gnd, Vcc, Sda, and Scl. Gnd should connect to ground, Vcc should connect to the Arduino's built in 5V supply, Sda should connect to A4 (analog pin 4), and Scl should connect to A5 (analog pin 5).
So far I've followed this guide Sleep Cycle Alarm Clock With Motion Sensor : 5 Steps - Instructables
Programming the RTC:
You need to run a program to set the time on the RTC to initialize it. I used the DS1307RTC library and the Time library to program my DS1307."The How to hook it up:
Solder wires to Gnd, Vcc, Sda, and Scl. Gnd should connect to ground, Vcc should connect to the Arduino's built in 5V supply, Sda should connect to A4 (analog pin 4), and Scl should connect to A5 (analog pin 5).
Programming the RTC:
You need to run a program to set the time on the RTC to initialize it. I used the DS1307RTC library and the Time library to program my DS1307.
The DS1307RTC library can be found at:
DS1307RTC Library, For Accessing Real Time Clock (RTC) Chips
The Time library can be found at:
http://www.pjrc.com/teensy/td_libs_Time.htmlC can be found at:
DS1307RTC Library, For Accessing Real Time Clock (RTC) Chips
The Time library can be found at:
http://www.pjrc.com/teensy/td_libs_Time.htm**l"

The error is complaining "I dont know this tmElements_t data type"
Maybe you had forgot to include something else.

Real Time Clock
After running the initial SetTime, it is very easy to use the DS1307. Be sure to include the Time.h and the DS1307RTC.h files and include the statement "tmElements_t tm;". In order to read the time from the clock, create an if statement saying "if(RTC.read(tm))" to check if the RTC time can be read. Within that if statement you can obtain any potion of the time by writing any of the following:
tm.Hour
tm.Minute
tm.Day
tm.Month
tm.Year

Bulbachu:
Hi everyone, I've been working on this for the past few days. I have successfully run both my stepper and 8 relay module but cant figure out how to integrate the real time clock into my project.
The goal is to have the arduino run the stepper motor signal every 12 hours. The stepper motor will act as an automated fish feeder for when Im on holiday. I also want the arduino to switch on certain relays for the light etc.
Is the RTC necessary?

My problems are:

1) when I plug in the real time clock my arduino stops flashing and appears to be off. The arduino program apparently still recognized the arduino on com4.

2) When I ran the set time file in the DS1307RTC library it did pop up on the sketch but I couldn't run it because the following error was found:

also the serial monitor was not showing me anything.

How to hook it up:
Solder wires to Gnd, Vcc, Sda, and Scl. Gnd should connect to ground, Vcc should connect to the Arduino's built in 5V supply, Sda should connect to A4 (analog pin 4), and Scl should connect to A5 (analog pin 5).
So far I've followed this guide Sleep Cycle Alarm Clock With Motion Sensor : 5 Steps - Instructables
Programming the RTC:
You need to run a program to set the time on the RTC to initialize it. I used the DS1307RTC library and the Time library to program my DS1307."The How to hook it up:
Solder wires to Gnd, Vcc, Sda, and Scl. Gnd should connect to ground, Vcc should connect to the Arduino's built in 5V supply, Sda should connect to A4 (analog pin 4), and Scl should connect to A5 (analog pin 5).
Programming the RTC:
You need to run a program to set the time on the RTC to initialize it. I used the DS1307RTC library and the Time library to program my DS1307.
The DS1307RTC library can be found at:
DS1307RTC Library, For Accessing Real Time Clock (RTC) Chips
The Time library can be found at:
http://www.pjrc.com/teensy/td_libs_Time.htmlC can be found at:
DS1307RTC Library, For Accessing Real Time Clock (RTC) Chips
The Time library can be found at:
http://www.pjrc.com/teensy/td_libs_Time.htm**l"

try this code , First you try without battery attached. and they look whether your Arduino stops blink

#include "Wire.h"
#define DS1307_ADDRESS 0x68
byte zero = 0x00; //workaround for issue #527

void setup(){
  Wire.begin();
  Serial.begin(9600);
  setDateTime(); /*not be highlighted while reading the time, Here it will setdate*/
}

void loop(){
  printDate();
  delay(1000);
}

void setDateTime(){

  byte second =      45; //0-59
  byte minute =      39; //0-59
  byte hour =        11; //0-23
  byte weekDay =    2; //1-7
  byte monthDay =    1; //1-31
  byte month =       2; //1-12
  byte year  =       13; //0-99

  Wire.beginTransmission(DS1307_ADDRESS);
  Wire.write(zero); //stop Oscillator

  Wire.write(decToBcd(second));
  Wire.write(decToBcd(minute));
  Wire.write(decToBcd(hour));
  Wire.write(decToBcd(weekDay));
  Wire.write(decToBcd(monthDay));
  Wire.write(decToBcd(month));
  Wire.write(decToBcd(year));

  Wire.write(zero); //start

  Wire.endTransmission();

}

byte decToBcd(byte val){
// Convert normal decimal numbers to binary coded decimal
  return ( (val/10*16) + (val%10) );
}

byte bcdToDec(byte val)  {
// Convert binary coded decimal to normal decimal numbers
  return ( (val/16*10) + (val%16) );
}

void printDate(){

  // Reset the register pointer
  Wire.beginTransmission(DS1307_ADDRESS);
  Wire.write(zero);
  Wire.endTransmission();

  Wire.requestFrom(DS1307_ADDRESS, 7);

   int second = bcdToDec(Wire.read());
  int minute = bcdToDec(Wire.read());
  int hour = bcdToDec(Wire.read() & 0b111111); //24 hour time
  int weekDay = bcdToDec(Wire.read()); //0-6 -> sunday - Saturday
  int monthDay = bcdToDec(Wire.read());
  int month = bcdToDec(Wire.read());
  int year = bcdToDec(Wire.read());

 /*  int second = 11;
  int minute =18;
  int hour = 18;
  int weekDay = 1;
  int monthDay = 2;
  int month = 11;
  int year = 12;
*/
  //print the date EG   3/1/11 23:59:59
  Serial.print(monthDay);
  Serial.print("/");
  
  
  Serial.print(month);
  Serial.print("/");
  
  Serial.print(year);
  Serial.print(" ");
  Serial.print(hour);
  Serial.print(":");
  Serial.print(minute);
  Serial.print(":");
  Serial.println(second);

}