How to set up one second interrupt/ISR for ds3231 RTC I am able to set up one hz interrupts using millis and other timers, but would like to do it instead using the RTC I have attached (DS3231)

I am not sure how I can do that.  Can someone point me to a reference for this?  

EDIT/UPDATE

I tried to use the square wave to trigger a call back/interrupt, but it's not working for me.  I followed what I thought was the wiring diagram here and 
here and here

I also added a led in the circuit to see if I could figure out something that way, but no dice.  

Here is some simple code for a sketch that I think should trigger a 1 second interrupt and call my function:

#include &lt;DS3232RTC.h&gt;    //http://github.com/JChristensen/DS3232RTC
#include &lt;Time.h&gt;         //http://www.arduino.cc/playground/Code/Time  
#include &lt;Wire.h&gt;         //http://arduino.cc/en/Reference/Wire (included with Arduino IDE)

const int rtcTimerIntPin = 2;
bool flag = false;

void setup(void)
{
    Serial.begin(9600);
    setSyncProvider(gRTC.get);   // the function to get the time from the RTC
    if (timeStatus() != timeSet)
        Serial.println("Unable to sync with the RTC");
    else
        Serial.println("RTC has set the system time");

    bool stopped = gRTC.oscStopped();
    if (stopped)
    {
        Serial.println("Detected clock power loss - resetting RTC date");
        time_t newTime = cvt_date(__DATE__, __TIME__);
        adjustTime(newTime);
        setTime(newTime);
    }
    else {
        Serial.println("Clock did not lose power");
    }

    pinMode(13, OUTPUT);    // onboard LED
    pinMode(rtcTimerIntPin, INPUT);
    attachInterrupt(rtcTimerIntPin, rtc_interrupt, RISING);
    gRTC.squareWave(SQWAVE_1_HZ);

    digitalClockDisplay();
}

void rtc_interrupt(void)
{
    flag = true;
}

void loop(void)
{
    //digitalClockDisplay();

    if (flag) {
        digitalWrite(LED_BUILTIN, HIGH);    // flash the led
        digitalClockDisplay();              // this just prints time to serial port 
        delay(500);                         // wait a little bit
        digitalWrite(LED_BUILTIN, LOW);     // turn off led
        flag =  false;                      // clear the flag until timer sets it again
    }
}

void digitalClockDisplay()
{
// do something
}
This answer addresses the original question of why the interrupts didn't work. I happened to have a DS3231 lying around so I made up a test.



Interrupt vs pin number

First, this is wrong in your code:


attachInterrupt(rtcTimerIntPin, rtc_interrupt, RISING);



You need an interrupt number, not a pin number. This is correct:

  attachInterrupt (digitalPinToInterrupt (rtcTimerIntPin), rtc_interrupt, CHANGE);


I also made it a CHANGE interrupt so you get both the rising and falling pulse.



Pull-up resistor

Next, the 1 Hz output needs a pull-up resistor, so you should add that or make it INPUT_PULLUP like this:

  pinMode (rtcTimerIntPin, INPUT_PULLUP);




Testing

I used this library from Adafruit.

Adapting one of their examples, and putting in your interrupt code (with my modifications), it worked!

#include &lt;Wire.h&gt;
#include "RTClib.h"

RTC_DS3231 rtc;

const byte rtcTimerIntPin = 2;

volatile byte flag = false;

void rtc_interrupt ()
{
  flag = true;
}  // end of rtc_interrupt

void setup () {

  Serial.begin(115200);

  while (!Serial); // for Leonardo/Micro/Zero

  if (! rtc.begin()) {
    Serial.println("Couldn't find RTC");
    while (1);
  }

  if (rtc.lostPower()) {
    Serial.println("RTC lost power, lets set the time!");
    // following line sets the RTC to the date &amp; time this sketch was compiled
    rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
  }

  // enable the 1 Hz output
  rtc.writeSqwPinMode (DS3231_SquareWave1Hz);

  // set up to handle interrupt from 1 Hz pin
  pinMode (LED_BUILTIN, OUTPUT);
  pinMode (rtcTimerIntPin, INPUT_PULLUP);
  attachInterrupt (digitalPinToInterrupt (rtcTimerIntPin), rtc_interrupt, CHANGE);
}

void loop () {
  if (flag) {
    digitalWrite(LED_BUILTIN, HIGH);    // flash the led
    delay(100);                         // wait a little bit
    digitalWrite(LED_BUILTIN, LOW);     // turn off led
    flag =  false;                      // clear the flag until timer sets it again
  }
}