Git Product home page Git Product logo

Comments (10)

Erriez avatar Erriez commented on May 24, 2024

@bamboo-master Thanks for your feedback. I've some questions:

Which version of the library are you using?

The pin's in the example are indicated in the example d2-3-4,

Which microcontroller are you using?

I changed it to 4-0-2 (gpio) the example compiled but didn't work.

Which example are you using? Did you make any changes?

Can pins be changed?

Yes, any digital pin can be used for AVR, ESP8266 and ESP32. I recommend to start with this example without modifications:

ErriezDS1302SetGetTime.ino

What am I doing wrong?

Another suggestion is to double check that the connected chip is a DS1302 and contains a 32kHz crystal oscillator.

from erriezds1302.

bamboo-master avatar bamboo-master commented on May 24, 2024

[v2.0.0]
esp8266 as in the picture
- jpg_640x640
ErriezDS1302Test example
changed only pin numbers
i have 32768Hz crystal oscillator.

from erriezds1302.

Erriez avatar Erriez commented on May 24, 2024

The ESP8266 pins in the sketches are tested with a NodeMCU. There is a pin conversion needed from Dx to GPIOy when using a bare ESP8266. Can you convert to GPIO pins without D in the defines?

#elif defined(ARDUINO_ARCH_ESP8266)
#define DS1302_CLK_PIN      2 // GPIO2 NodeMCU: D4 Pin is high during power-on / reset / flashing
#define DS1302_IO_PIN       0 // GPIO0 NodeMCU: D3 
#define DS1302_CE_PIN       4 // GPIO4 NodeMCU: D2

from erriezds1302.

bamboo-master avatar bamboo-master commented on May 24, 2024

Yes I've done that before.

from erriezds1302.

Erriez avatar Erriez commented on May 24, 2024

I tried to reproduce with:

  • LOLIN(WEMOS) D1 mini Lite ESP8266 mini lite (I could not find a bare ESP8266)
  • Default ErriezDS1302SetGetTime.ino
  • Arduino v1.8.19 IDE
  • ESP8266 Community v3.0.2
  • ErriezDS1302 master hash 0093bc7

image

Output:

Erriez DS1302 set get time example
12:00:00
12:00:01
12:00:02
12:00:03
...

Unfortunately, I could not reproduce it.

from erriezds1302.

bamboo-master avatar bamboo-master commented on May 24, 2024

And you can check with pins ?
#define DS1302_CLK_PIN 13
#define DS1302_IO_PIN 14
#define DS1302_CE_PIN 15

from erriezds1302.

Erriez avatar Erriez commented on May 24, 2024

That works.

from erriezds1302.

bamboo-master avatar bamboo-master commented on May 24, 2024

Are pull-up resistors needed there? Could I have damaged the rtc?

from erriezds1302.

bamboo-master avatar bamboo-master commented on May 24, 2024

The problem is not only with rtc, it also does not work with bmp180, some pins do not respond at all, once it was possible to start normally and then again "not found". Maybe the board is damaged or some other binding is needed, I will buy a NodeMCU and compare it.

from erriezds1302.

Erriez avatar Erriez commented on May 24, 2024

Thanks for sharing. Using a NodeMCU is a good idea. Success!

from erriezds1302.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.