Install and Configure Real Time Clock RTC-DS1307 for Raspberry Pi

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 มี.ค. 2022
  • #raspberrypi
    This video tutorial demonstrates how to install and configure an RTC DS1307 on a Raspberry Pi for accurate timekeeping. The process involves physically connecting the RTC to the Raspberry Pi, configuring the Pi through the terminal, and modifying files to use the RTC for timekeeping. The tutorial provides step-by-step instructions and includes commands to enter in the terminal. The end result is a Raspberry Pi configured to use the RTC for accurate timekeeping.
    Commands Used:
    sudo i2cdetect -y 1
    sudo modprobe rtc-ds1307
    sudo bash
    echo ds1307 0x68 &gt /sys/class/i2c-adapter/i2c-1/new_device
    exit
    to read the hrtc time type
    sudo hwclock -r
    to write time to rtc type
    sudo hwclock -w
    sudo nano /etc/modules
    at the end of the file add
    rtc-ds1307
    then CTRL-X then Y then enter to save
    sudo nano /etc/rc.local
    before exit 0 copy and paste
    echo ds1307 0x68 &gt /sys/class/i2c-adapter/i2c-1/new_device
    sudo hwclock -s
    date
    then CTRL-X then Y then enter to save
    And now we have configured the PI to save and use the time of the RTC
    Let me know if you have any questions or comments below and make sure to subscribe
    Thanks for watching
    ---------------------------------------------------
    Hardware used to build the QRP Rig
    uBitx transceiver :
    www.hfsignals.com/index.php/u...
    Raspberry Pi:
    www.raspberrypi.com/products/...
    VK-172 USB GPS Receiver:
    ebay.us/sVOxKz
    DS3231 RTC Clock Memory Module:
    ebay.us/jMiCTT
    Sabrent USB External Stereo Sound Adapter:
    ebay.us/r8W9ei
    RTL-SDR USB Dongle:
    ebay.us/1Wl2wz
    USB Extensions:
    ebay.us/3Q7GdM
    1-Foot 3.5mm, 1/8" Stereo Male to Male Audio Cable:
    ebay.us/g6rWZN
    If this video helped give it a like and make sure to subscribe thanks
    Some of the links above may be affiliate links. Clicking on the links may result in this channel earning a small commission. This helps me afford to continue making videos and you still get the item for the normal price. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
  • วิทยาศาสตร์และเทคโนโลยี

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

  • @jps99
    @jps99 ปีที่แล้ว +1

    Nicely explained, surprised you don't have a lot more views!

  • @munaza9809
    @munaza9809 2 หลายเดือนก่อน

    Can we use this method to show time on a website with RPi in kiosk mode?

  • @Kris-hr6wg
    @Kris-hr6wg ปีที่แล้ว +1

    Great video! Just found your channel and was wondering if the RTC strictly just keep time or can it be used for other things as well? The project I’m working on calls for a RTC and I just don’t know much about them. Thanks!!

    • @BrokenSignal
      @BrokenSignal  ปีที่แล้ว

      RTC stands for Real Time Clock. It just keeps time.

  • @Max-ci3mu
    @Max-ci3mu ปีที่แล้ว +1

    Nice tutorial! I have a RTC-DS3231 for my Raspberry Pi 4. Can I follow the same procedure in your video?

    • @BrokenSignal
      @BrokenSignal  ปีที่แล้ว

      DS3231 and DS1307 are functionally the same, except that DS3231 has a built-in temperature compensated crystal. So you should be able to follow this for your RPI 4.

  • @KG-dg4gt
    @KG-dg4gt ปีที่แล้ว

    I get hwclock: Cannot access the hardware Clock via any known method

    • @BrokenSignal
      @BrokenSignal  ปีที่แล้ว

      Not sure which step you received this error on but try typing "sudo" in front of the command. It sounds like a permissions issue.