You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
lang-cpp
DateTime now;
in global scope": what happens if you do so? A compilation error? Incorrect run-time behavior? I tried and it compiles just fine (but I have no RTC for testing).DateTime now = rtc.now()
might have utilize "copy elision", so it gets constructed directly intonow
variable and therefore it's faster than your approach (as you effectively blocked this possibility - so it has to create temporary object and copy it into now variable).Setup()
.Setup()
starts withSerial.begin(9600); Serial.println("test");
Blinking the builtin-led doesn't work either.