Git Product home page Git Product logo

Comments (2)

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

Hello Shannon,

I looked at the code again and realized that I was wrong, the "readCommand" doesn't always read the whole input string in one iteration and when that happens the output of the date can be mangled. I will change the code around to fix that.

from ds3231m.

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

Hello Shannon,
I am assuming you mean the "sprintf" at line 175 in the "Set.ino" example program.
Since this sketch doesn't use interrupts, any execution of code will be linear and the CPU speed won't affect the order in which things happens, just their timing. The "Serial.println()" command after the "sprintf()" won't return until the whole buffer has been sent to the serial port so there's no chance of garbling the "inputBuffer". I tested this on several Arduinos (UNO, Micro (32U4 processor), Mega, and other processors on a breadboard) with no problems so I'm not quite sure what problem you are seeing.
I do think I should refactor the program and rename "inputBuffer" to "textBuffer" so that it is clear that this character buffer is being used for both types of functions.

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.