I wanted to document my steps/experience using the Nano Every with the Adafruit DS3231 breakout.
Step 1: Setup my hardware. After attaching the headers to the Nano Every and DS3231 breakout, I put them on a breadboard along with an LED and resistor connected between the SQW pin of the DS3231 breakout and 5V supplied by the Nano Every. I did not have the correct button cell for the DS3231 battery backup, so I used a 2xAAA holder to get the 3V battery backup. This is a temporary solution until my CR1220 button cells arrive. See picture of my breadboard setup.
Step 2: I installed the Arduino IDE version 1.8.16 for MacOS.
Step 3: I went to the Nano Every docs page (https://docs.arduino.cc/hardware/nano-every) and clicked on "Quick Start Guide", and followed the steps to install the megaAVR core, etc. This was critical to get the Nano Every to show up in the "Boards" list under Arduino IDE.
Step 4: I made sure that the Arduino IDE settings were correct for my board and port.
Tools > Boards > megAVR Boards > Arduino Nano Every
Tools > Emulation > None
Tools > Port > /dev/cu.usbmodem14401
Step 5: Install the Adafruit BusIO library by using Tools > Manage Libraries
and searching for "Adafruit BusIO" and selecting the latest version and clicking install.
Step 6: Install the RTC library by getting the zip file from the link on this page Overview | Adafruit DS3231 Precision RTC Breakout | Adafruit Learning System and using Sketch > Include Library > Add .ZIP Library.
Step 7: Plug in the USB cable and try running the basic blinking LED program from File > Examples > Basics > Blink. I played around with the time durations and re-uploaded to make sure everything was working correctly. I always get the following message but as far as I can tell, it is not critical: "avrdude: jtagmkII_initialize(): Cannot locate "flash" and "boot" memories in description"
Step 8: Open the DS3231 example from File > Examples > RTClib > ds3231 and run it. Also open Tools > Serial Monitor so you can see the output. I was getting some inconsistent behavior with uploads, but the biggest "AH HA" moment was that I needed to make sure the BAUD setting on the serial monitor was set to 57600 - which was the setting used in the DS3231 example sketch. Once I had that set correctly, the sketch ran perfectly.
Step 9: My main goal was to enable the SQW pin of the DS3231 breakout to output a 1Hz signal. There was not an example file for doing this for the DS3231, but there is an example for the similar DS1307 - File > Examples > DS1307SqwPin. I opened this and made a few mods - basically replacing DS3231 for DS1307 for the library call, etc. Also, mode "ON" does not exist in the DS3231, so I removed that from the print_mode section. I will copy my exact code to a reply.
Step 10: Once I had that working, I combined those two sketches into a new sketch that just set the Sqw pin to 1Hz and did not cycle through the options. It also just reports the current time, not the other info printed in the DS3231 example. I will copy that code in as well.
The cool think about the DS3231 is that if you have it battery backed up, if you pull main power than then re-apply power with the Arduino disconnected, the DS3231 will come back up in the same state - ie with the 1Hz output setting I gave it - and with the correct date and time. Now I have an accurate 1Hz source I can use in any project, Arduino or no.
From start to finish, this only took me about 2 hours to get familiarized with the tools and the programming language. I am super pleased with the Arduino and the DS3231 so far. Pictures and code to follow.