i2c object error?
El Paisa
Posts: 375
I am trying to use some of the routines of the i2c object by James Burrows
Seems there is confusion between Day and Date.
ds1307object.getDays seems to work OK giving the day of the month, but
ds1307object.getDate (supposed to be the day of the week) always returns 0
In the declarations
DS1307Obj*· in i2clibrary_version1.2
PUB· getDate : ds_seconds
PUB· getDays : result··
Whats is going on?
·
Seems there is confusion between Day and Date.
ds1307object.getDays seems to work OK giving the day of the month, but
ds1307object.getDate (supposed to be the day of the week) always returns 0
In the declarations
DS1307Obj*· in i2clibrary_version1.2
PUB· getDate : ds_seconds
PUB· getDays : result··
Whats is going on?
·
Comments
I don't know why there's a ": ds_seconds" in the declaration since it's not used. By default,
any method will return zero if another value is not set.
If ds1307object.getDays is working, then getDate must be working properly since getDays
just fetches the value read by getDate and converts it to an integer.
Yes its been raised before - i've the intention of correcting and testing it - but have had no time for ages!
Feel free to correct and modify for your own purposes - its not written to do everything for everybody!
Cheers,
james