Skip to main content
Arduino

Timeline for Use of "static" with "RTClib"

Current License: CC BY-SA 4.0

7 events
when toggle format what by license comment
Apr 23, 2020 at 17:16 comment added blackdaw See the comments above beneath @EdgarBonet 's solution. It compiles and uploads but doesn't execute.
Apr 22, 2020 at 20:36 comment added Michel Keijzers @EdgarBonet ... me neither, I'm wondering why creating it as global variable wouldn't work.
Apr 22, 2020 at 20:34 comment added Edgar Bonet Re "I suspect, the constructor calls a function that uses variables or a function that is not initialized at that point": I can't see anything wrong in this constructor.
Apr 22, 2020 at 20:10 comment added Michel Keijzers I updated my answer, just try if it helps.
Apr 22, 2020 at 20:09 history edited Michel Keijzers CC BY-SA 4.0
added 757 characters in body
Apr 22, 2020 at 19:54 comment added blackdaw Forgot to mention: Defining it outside of loop() in the global scope DOES NOT WORK! Don't ask me why, I spent hours just to find this problem. This is the reason why I wanted to use static in the first place. Will edit my post. And concerning the name "now": It's just what they used in the example, I won't use it, but good point!
Apr 22, 2020 at 19:47 history answered Michel Keijzers CC BY-SA 4.0

AltStyle によって変換されたページ (->オリジナル) /