Comments (2)
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.
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)
- Doc example error ? HOT 1
- the bug of HOUR writing&reading HOT 4
- no way to tell whether the clock is set. HOT 1
- Reformat source code to clang-format HOT 1
- .adjust() not setting the correct time HOT 12
- DS3231 vs DS3231M HOT 7
- Make directory structure adhere to Arduino 1.5.x and later structure HOT 1
- Link to Maxim on wiki pages is broken HOT 1
- dayOfTheWeek() has incorrect range HOT 2
- Calculate leap year HOT 3
- How to stop an defined alarm HOT 10
- STM32 cant upload again HOT 2
- Add support for 400KHz bus speed HOT 1
- Fix overflow on I2C speed definitions HOT 1
- Implement Travis-CI
- Update "SetAlarms.ino" to Doxygen-style comments and formatting HOT 1
- Change "Set.ino" to doxygen style comments and formatting HOT 1
- Change library source files to Doxygen-style comments and formatting HOT 1
- logic on pinAlarm and pinSquareWave are inverted HOT 2
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 ds3231m.