OK 1ST i am a father that doesn't really get "coding"
i am helping or trying to help my Austic stepson he is really focusing on building arduino things
and with the covid19 lock down it really keeps his mind focused
here is what we have so far Arduino Nano clone old bootloader
Rtc DS3231
16x2 lcd "not I2C " controlled the older kind with 16 raw header pins
and breadboard and wires
his mind only works in AM/PM 12 hour format his whole world is a schedual based on this time format als ois there a way to make the date read month / daY / YEAR?
he has had several meltdowns trying to figure this out and again im GREEN please offer help if you can
we are using the DS3231 _sereal-easy to load the time on the ds3231
#include <DS3231.h>
// Init the DS3231 using the hardware interface
DS3231 rtc(SDA, SCL);
void setup()
{
// Setup Serial connection
Serial.begin(115200);
// Uncomment the next line if you are using an Arduino Leonardo
//while (!Serial) {}
// Initialize the rtc object
rtc.begin();
// The following lines can be uncommented to set the date and time
rtc.setDOW(SUNDAY); // Set Day-of-Week to SUNDAY
rtc.setTime(18, 58, 0); // Set the time to 12:00:00 (24hr format)
rtc.setDate(3, 5, 2020); // Set the date to January 1st, 2014
}
void loop()
{
// Send Day-of-Week
Serial.print(rtc.getDOWStr());
Serial.print(" ");
// Send date
Serial.print(rtc.getDateStr());
Serial.print(" -- ");
// Send time
Serial.println(rtc.getTimeStr());
// Wait one second before repeating
delay (1000);
}
and this code to load and run the lcd
#include <DS3231.h>
#include <LiquidCrystal.h>
DS3231 rtc(SDA, SCL);
LiquidCrystal lcd(1, 2, 4, 5, 6, 7);
void setup() {
rtc.begin();
lcd.begin(16,2);
}
void loop() {
lcd.setCursor(0,0);
lcd.print("Time: ");
lcd.print(rtc.getTimeStr());
lcd.setCursor(0,1);
lcd.print("Date: ");
lcd.print(rtc.getDateStr());
delay(1000);
}