Git Product home page Git Product logo

Comments (7)

SV-Zanshin avatar SV-Zanshin commented on June 11, 2024 1

You are correct, I don't know how that slipped by me!

from ds3231m.

SV-Zanshin avatar SV-Zanshin commented on June 11, 2024

I have made a some changes to the code which make this pull request a bit of a chore to integrate, so I am going to add your code to my branch and integrate that..

from ds3231m.

SV-Zanshin avatar SV-Zanshin commented on June 11, 2024

I've added the changes, having changed the code just a little bit to stay backwards-compatible. I'll draft a new 1.0.7 release that will include this additional functionality as well. Thanks!

from ds3231m.

lagg070988 avatar lagg070988 commented on June 11, 2024

thanks for you!
I believe that writeByte(DS3231M_CONTROL, readByte(DS3231M_CONTROL) & ~B00111000); line 528
should be writeByte(DS3231M_CONTROL, readByte(DS3231M_CONTROL) & ~B00011100);

in writeByte(DS3231M_CONTROL, (readByte(DS3231M_CONTROL) & ~B00111000) | (rate | B00000011) << 3); line 540
should be writeByte(DS3231M_CONTROL, (readByte(DS3231M_CONTROL) & ~B00011100) | (rate & B00000011) << 3);
in the next few days I will prove this.

from ds3231m.

lagg070988 avatar lagg070988 commented on June 11, 2024

I forgot to highlight the change between the "or" and "and" in the previous comment, line 540, otherwise the output would always be 8khz
sorry

from ds3231m.

lagg070988 avatar lagg070988 commented on June 11, 2024

I have tested today on arduino nano and it works as expected pinSquareWave () and pinSquareWave (const uint8_t rate) .
thanks!

from ds3231m.

SV-Zanshin avatar SV-Zanshin commented on June 11, 2024

That's great news - I'm glad we could make the library work better.

from ds3231m.

Related Issues (20)

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.