Sure! Here's a wiring diagram and code for a 0.96 inch OLED display, an Arduino Nano, and an RTC DS3231 module. This code will display the current time and date on the OLED display.
This code uses the Adafruit_SSD1306 OLED driver library and RTClib library to control the OLED display and RTC module respectively.
In the setup() function, we initialize the OLED display and RTC module. If the RTC module is not running, we set the time to the compile time of the sketch.
In the loop() function, we get the current time from the RTC module using rtc.now(). We then display the time and date on the OLED display using the display.print() and display.println() functions.
I hope this helps! Let me know if you have any questions.