Naguissa / uRTCLib

Really tiny library to basic RTC functionality on Arduino. DS1307, DS3231 and DS3232 RTCs are supported.
https://www.foroelectro.net/librerias-arduino-ide-f29/rtclib-arduino-libreria-simple-y-eficaz-para-rtc-y-t95.html
GNU Lesser General Public License v3.0
87 stars 24 forks source link

ESP8266 #24

Closed JohnBelding closed 3 years ago

JohnBelding commented 3 years ago

I have been looking for your solution with the DS3231 for weeks and happily tried it.

I had to change a couple of things in your example code for the ESP8266, D1,D2 vs D3,D4 and DS3231 vs DS3232.

It compiled and uploaded fine, but did not work. I ensured that I had put the Capacitor in correctly, but still didn't work. This is what the uRTCLib_example running code provided: Serial OK RTC DateTime: 165/25/165 45:85:85 DOW: 165 - Temp: 0 RTC DateTime: 165/25/165 45:85:85 DOW: 165 - Temp: 0 RTC DateTime: 165/25/165 45:85:85 DOW: 165 - Temp: 0

I tried your other examples and got the same type of results.

I recompiled my original code (Makuna library) which blew up when I didn't have the capacitor installed and it worked fine and now resets the ESP8266 when the alarm is fired -- didn't work before.

So, thanks for telling me about the capacitor, but I would like to get your code working too .

Any suggestions?

John B.

Naguissa commented 3 years ago

Seems everything is wrong. I'll check on my own ASAP, but you could check GPIO pins meanwhile.

What editor / compiler do you use? I've observed problems on conditional defines on PlatformIO....

Naguissa commented 3 years ago

You can check pin definitions using this table: https://www.foroelectro.net/electronica-digital-microcontroladores-f8/esp8266-equivalencia-entre-pines-y-gpio-t161.html

JohnBelding commented 3 years ago

Pins are fine and work with a different library.

I'm using Arduino IDE with your library from github.

John B.


From: Naguissa notifications@github.com Sent: Saturday, January 9, 2021 5:19 AM To: Naguissa/uRTCLib uRTCLib@noreply.github.com Cc: JohnBelding beldingj@hotmail.com; Author author@noreply.github.com Subject: Re: [Naguissa/uRTCLib] ESP8266 (#24)

Seems everything is wrong. I'll check on my own ASAP, but you could check GPIO pins meanwhile.

What editor / compiler do you use? I've observed problems on conditional defines on PlatformIO....

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNaguissa%2FuRTCLib%2Fissues%2F24%23issuecomment-757127873&data=04%7C01%7C%7C1f151374310d47d77fab08d8b487fcd6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637457843436330535%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=aYhQGUQeXx4mJbm3mQJIyS%2BRM5w1gqhewyVOKJqUhak%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAJ65O4K7JIR2GO24VC6XAEDSZAURNANCNFSM4VXVG5VQ&data=04%7C01%7C%7C1f151374310d47d77fab08d8b487fcd6%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637457843436340529%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=161w%2Ff1gwLKol4Ba%2F79Vf9%2FhWoLl9yL6xEnbFjDzSjU%3D&reserved=0.

Naguissa commented 3 years ago

Tested with LoLin v3 (ESP8266 ESP12E), "Example", adding rtc.set_model(URTCLIB_MODEL_DS3231); before rtc.set line, and everything works OK, without pullups or any extra component:


Serial OK
RTC DateTime: 15/5/2 16:42:0 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:1 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:2 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:3 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:4 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:5 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:6 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:7 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:8 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:9 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:10 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:11 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:12 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:13 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:14 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:15 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:16 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:17 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:18 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:19 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:20 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:21 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:22 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:23 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:24 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:25 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:26 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:27 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:28 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:29 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:30 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:31 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:32 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:33 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:34 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:35 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:36 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:37 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:38 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:39 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:40 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:41 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:42 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:43 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:44 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:45 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:46 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:47 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:48 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:49 DOW: 6 - Temp: 14
RTC DateTime: 15/5/2 16:42:50 DOW: 6 - Temp: 14

(date is wrong because I've used the example, which sets just that date-time).