Библиотека ds3231 для arduino

Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Join GitHub today

GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Clone with HTTPS

Use Git or checkout with SVN using the web URL.

Downloading

Want to be notified of new releases in rodan/ds3231 ?

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio

Permalink

Type Name Latest commit message Commit time
Failed to load latest commit information.
examples — renamed pgm_read_byte to avoid compile warnings Jul 27, 2018
README email change Sep 1, 2018
config.h On the D21 and ESP32 the UNIX time can be used be the C-Runtime, Jul 31, 2018
ds3231.cpp not bool again Aug 6, 2018
ds3231.h Added support for the ESP32 async I2C driver which may not have the Jul 31, 2018
library.json email change Sep 1, 2018
  • © 2020 GitHub, Inc.
  • Terms
  • Privacy
  • Security
  • Status
  • Help

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Arduino library for the DS3231 real-time clock (RTC)

Author Andrew Wickert Website https://github.com/NorthernWidget/DS3231 Category Timing License Unlicense Library Type Contributed Architectures Any

Abstracts functionality for clock reading, clock setting, and alarms for the DS3231 high-precision real-time clock. This is a splice of Ayars’ (http://hacks.ayars.org/2011/04/ds3231-real-time-clock.html) and Jeelabs/Ladyada’s (https://github.com/adafruit/RTClib) libraries.

Downloads

Filename Release Date File Size
DS3231-1.0.2.zip 2017-10-11 22.17 KiB
DS3231-1.0.0.zip 2017-02-06 22.12 KiB

This website is Open Source, please help improve it by submitting a change on GitHub:
https://github.com/njh/arduino-libraries

The content on this site was last updated: 2020-01-17 16:36:36 +0000

Релизы

Описание библиотеки:

Библиотека позволяет читать и записывать время RTC модулей на базе чипов: DS1302, DS1307 , DS3231, .
Преимуществом данной библиотеки является удобная реализация получения времени.

Данная библиотека может использовать как аппаратную, так и программную реализацию шины I2C.
О том как выбрать тип шины I2C рассказано в статье Wiki — расширенные возможности библиотек iarduino для шины I2C.

Назначение функций и переменных:

Подробное описание работы с библиотекой, находится в разделе Wiki Часы реального времени.

#include // Подключаем библиотеку.
iarduino_RTC ОБЪЕКТ ( НАЗВАНИЕ [, ВЫВОД_RST [, ВЫВОД_CLK [, ВЫВОД_DAT ]]] ); // Создаём объект.

Функция begin(); // Инициализация работы RTC модуля.

Функция settime( СЕК [, МИН [, ЧАС [, ДЕНЬ [, МЕС [, ГОД [, ДН ]]]]]] ); // Установка времени.

Функция gettime( [ СТРОКА_ШАБЛОН ] ); // Чтение времени.

Функция blinktime( ПАРАМЕТР [ ЧАСТОТА ] ); // Заставляет функцию gettime «мигать» указанным параметром времени.

Функция period( МИНУТЫ ); // Указывает минимальный период обращения к модулю в минутах.

Функция settimeUnix( СЕКУНДЫ ); // Установка времени Unix time.

Функция gettimeUnix(); // Чтение времени Unix time.

При любом обращении к функциям gettime() и gettimeUnix(), автоматически обновляются значения следующих переменных:

Переменная seconds // Содержит секунды от 0 до 59.

Переменная minutes// Содержит минуты от 0 до 59.

Переменная hours // Содержит часы от 1 до 12.

Переменная Hours // Содержит часы от 0 до 23.

Переменная midday // Содержит полдень 0 или 1 (0-am, 1-pm).

Переменная day // Содержит день месяца от 1 до 31.

Переменная weekday // Содержит день недели от 0 до 6 (0-воскресенье, 6-суббота).

Переменная month // Содержит месяц от 1 до 12.

Переменная year // Содержит год от 0 до 99.

Переменная Unix // Содержит секунды прошедшие с начала эпохи Unix, от 0 до 4’294’967’295.

Функции settimeUnix(), gettimeUnix() и переменная Unix доступны в библиотеке версии 1.3.4 и выше.

Оцените статью
Topsamoe.ru
Добавить комментарий