Comments (4)
@yoshuaaadk Thanks for using my library. I've tested the ErriezDS1302RAM
example on an UNO and ESP32-WROOM board on master
(tag 2.0.0) today and both works. Also tested with the clock pin on GPIO2.
There are also known fake DS1302 chips which do not work correctly on 3.3V. The RAM example works without a battery. I had one RTC on a PCB with a defect crystal, but I do not remember if this is required when accessing RAM.
Your output seems to be related to no power or a wiring problem. Some boards uses different pin numbering. It is recommended to:
- Is the chip mounted in the correct direction? (check pin 1)
- Measure the power on the DS1302 chip
- Toggle the CLK / IO and CE pins individually and measure if these pins respond as expected.
Success!
from erriezds1302.
Thankyou for your response. I also have try this DS1302 with arduino Uno using this library, and it runs fine with default pins that you gave.
#define DS1302_CLK_PIN 2
#define DS1302_IO_PIN 3
#define DS1302_CE_PIN 4
Now i try to toggle the Pins of CLK /IO and CE and gave me conclusion that if either CLK / IO is disconnect to board, it will return "RTC not found", but when i disconnect the CE it still detect DS1302 but cannot execute the RTC.read() function and return "RTC read failed". I think in the case of my ESP32 that the pin of CE is not defined and attached correctly on the same Pins. I will try one by one which one is the correct PINS on ESP32 if i declare like this:
#define DS1302_CLK_PIN 2
#define DS1302_IO_PIN 4
#define DS1302_CE_PIN 5
The power seems fine, because i attached the RTC power source to my Arduino Uno with 5V.
Once more thankyou for your response!
from erriezds1302.
Now it works fine, thankyou for your advice!
It because the wiring of ESP32, i have to connect another ground wire from ESP32 to my Power source (Arduino Uno) instead using the default USB power ground.
I want to ask you, once i write initial Time to RTC, it will automatically ticking by itself right? If i want to build ESP32 relay scheduler works with and without WiFi, is it better to set the time everytime ESP32 turn on by re-setting the time when it connect to WiFi from NTP, or just set it once and let it ticking?
And is there any ways to change the format of time inside "cpp" or "h" files?
Thankyou so much!!! This library saved my project.
from erriezds1302.
Good to hear that you found an issue with the wiring.
Function clockEnable()
should be called once after first power-on without a battery attached. (See examples). Then the clock remains ticking when a battery is connected and main power (3.3V or 5V) is removed.
Time deviations may be visible within weeks, but depends on the XTAL and is different per RTC. I use the DS1302 to control an lake pump which is less critical and needs to be reprogrammed every half year (summer/winter time). This accuracy is sufficient. For higher accuracy, a DS3231 is recommended, but probably not necessary for you. Reprogramming the RTC once a day or week via NTP is probably sufficient.
Timeformat can be changed with standard C time functions by including <time.h>. time_t getEpoch();
maybe helpful.
Success!
from erriezds1302.
Related Issues (3)
- PIN CE of ESP32 HOT 1
- esp12 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from erriezds1302.