Quantcast
Channel: Arduino Forum - Latest topics
Viewing all articles
Browse latest Browse all 15514

Does anyone have an idea what's going on with this code?

$
0
0
#include <DS3231.h>

#include <LiquidCrystal.h>
int Contrast = 100;

DS3231 rtc(SDA, SCL);
LiquidCrystal lcd(9, 8, 5, 4, 3, 2);
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);
}


image

20 posts - 7 participants

Read full topic


Viewing all articles
Browse latest Browse all 15514

Trending Articles