Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 484 Bytes

DS1307-IC.md

File metadata and controls

27 lines (20 loc) · 484 Bytes

I2C Real-Time Clock

Sensors That Use This IC

I2C Address

0x68 (fixed)

Usage

Register device:

echo ds1307 0x68 > /sys/bus/i2c/devices/i2c-<port+2>/new_device

Finding device class node:

for chip in $(find /sys/class/rtc -name rtc*)
do
    if [[ "$(cat $chip/name)" == "ds1307" ]]
    then
        # do whatever
    fi
done