Build Your OWN Arduino Clock with DS1302 RTC and I2C LCD Display Now!

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ม.ค. 2025

ความคิดเห็น • 9

  • @zs_gmbor
    @zs_gmbor 12 วันที่ผ่านมา

    Good video

  • @leohamelinck3524
    @leohamelinck3524 14 วันที่ผ่านมา

    Thanks for the explanation, very clear!
    But in Europe (Holland) we use a 24-hour clock.
    Do you have a solution for that?
    Greetings
    Leo

    • @arduinointrochannel
      @arduinointrochannel  14 วันที่ผ่านมา

      Sure! To modify the code to display time in 24-hour format, you can remove the logic for determining AM/PM and adjust the code to directly print the t.hr value as the hour. You can try this:
      void loop() {
      Time t = rtc.time();
      // Display the time in 24-hour format
      lcd.setCursor(0, 0);
      lcd.print("Time ");
      if (t.hr < 10) lcd.print("0"); // Add leading zero if hour is less than 10
      lcd.print(t.hr);
      lcd.print(":");
      if (t.min < 10) lcd.print("0"); // Add leading zero if minutes are less than 10
      lcd.print(t.min);
      lcd.print(":");
      if (t.sec < 10) lcd.print("0"); // Add leading zero if seconds are less than 10
      lcd.print(t.sec);

  • @saesa-yw2gx
    @saesa-yw2gx 18 วันที่ผ่านมา

    i have a problem with the lcd initialize "POSITIVE wasnt declared in this scope",
    can you help me sir ?

    • @arduinointrochannel
      @arduinointrochannel  18 วันที่ผ่านมา +1

      The I2C LCD and Wire libraries may not have been installed, or there could be a conflict with another installed LCD library. Check this article on how to download and install the libraries: www.arduinointro.com/articles/projects/displaying-characters-using-the-i2c-liquid-crystal-display-lcd

    • @saesa-yw2gx
      @saesa-yw2gx 18 วันที่ผ่านมา

      @arduinointrochannel Thank you for your respond then, what's the name of the library you install for this project? , i've already installed lcd 12c built in officially by arduino 1.0.7 isnt that the right library?
      And what's the name of wire library you use?

  • @Oh-ou4lp
    @Oh-ou4lp 11 วันที่ผ่านมา

    cool but what dose it do that a 15$ clock cant in honesty a 15$ has am/fm and alarms so whatthe point of this just to show or is there more to this

    • @arduinointrochannel
      @arduinointrochannel  10 วันที่ผ่านมา

      It's a fun project to learn about real-time clocks and I2C communication. Plus, you can customize or scale it to fit your project needs like an automated gardening system where you can turn on/off grow lights or water pumps at certain times or specific days (using conditional logic), or you can use it to make a log, with a date and time stamp, of anything that is captured by sensors connected to this Arduino setup. Think of this as a foundation of the greater things you can do with creativity and innovation.