Ноя 212017
 

Для подключения RTC DS3231 к Orange PI Lite, чтобы часики тикали без интернета.

root:# echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-0/new_device

rc.local:

echo ds3231 0x68 > /sys/class/i2c-adapter/i2c-0/new_device
rm -f /dev/rtc
ln -s /dev/rtc1 /dev/rtc
/sbin/hwclock -s

Вот модуль из Aliexpress

Как проверить что модуль работает. Address DS3231 0x68

 i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
 Posted by at 10:41

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

*