DS1307 addon
See also: addon.
Parent - the parent arduino object.
Pins - the pins allocated the addon.
Constructor to create DS1307 addon
arObj - the arduino parent object
propertyname, propertyvalue - optional property name, value pairs. Current known properties are:
I2C address of the DS1307 (default 0x68)
obj - created DS1307 object
a = arduino()
rtc = addon(a, "rtcaddon/ds1307")
Get/set the DS1307 clock
dsObj - the ds1307 object
date - a date vector in same format as datevec and clock
date - a date vector in same format as datevec and clock
a = arduino()
rtc = addon(a, "rtcaddon/ds1307")
# get and display rtc time as a date string
datestr(rtc.clock)
See also: datevec.
Get/set the DS1307 clock
dsObj - the ds1307 object
ctrl - a structure containing the control bit fields.
ctrl - a structure containing the control bit fields.
Control structure fields are: Current properties are:
Out bit in the control register
Square wave enable bit in control register
The combined RS0, RS1 value
Get whether the RTC clock is currently counting time
dsObj - the ds1307 object
YN - returns true if the RTC is counting
See also: start, stop.
Start the RTC counting
dsObj - the ds1307 object
None
See also: datevec.
Stop the RTC counting
dsObj - the ds1307 object
None
See also: datevec.
Package: arduino