treboada / ds1302 Goto Github PK
View Code? Open in Web Editor NEWA C/C++ library to use DS1302 RTC chip.
License: GNU Affero General Public License v3.0
A C/C++ library to use DS1302 RTC chip.
License: GNU Affero General Public License v3.0
Hello
I'm using Ds1302 library on an attiny85. It works ok.
I need to do some calculations with dates. I look for "timstamp" but no luck.
Is it possible to get a timestamp for a given date or from the RTC ?
I also installed TimeLib library to get timestamps, but it does misbehave when Ds1302 is running aside
Please can you give some advice on getting timestamps from Ds1302::DateTime objects ?
Thanks
I'm using your wonderful library in a project that I try to keep compatible with both platformio and Arduino IDE.
Would it be possible to add this library to the Arduino library manager?
Hello,
I got this error, compiling a a previously correct program incl. Your library DS1302 v 1.0.4 in Arduino IDE 2.0.3:
_**C:\Users\Me\AppData\Local\Temp\ccOl8sUg.ltrans0.ltrans.o: In function _writeByte': C:\Users\Me\Documents\Arduino\libraries\DS1302/DS1302.cpp:382: undefined reference to
shiftOut'
collect2.exe: error: ld returned 1 exit status
exit status 1
Compilation error: exit status 1**_
Platform: Arduino UNO
Please check if it can be corrected?
Greetings,
Reported by Reinhard Kopka
I found an error (at least with ESP32) in the lib.
Ds1302.cpp
github:
void Ds1302::_prepareRead(uint8_t address)
{
_setDirection(INPUT);
digitalWrite(_pin_ena, HIGH);
uint8_t command = 0b10000001 | address;
_writeByte(command);
}
correct:
void Ds1302::_prepareRead(uint8_t address)
{
_setDirection(OUTPUT); // the command needs an output to be sent
digitalWrite(_pin_ena, HIGH);
uint8_t command = 0b10000001 | address;
_writeByte(command);
_setDirection(INPUT);
}
Many thanks for the DS1302 functions.
You publish a halt() function. The data sheet says the oscillator halt flag is undefined after power lost.
So it would be a good idea also to publish a start() function to set the oscillator into running mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.