Replies: 2 comments
-
Thanks for your interesting suggestion! I do have an Arduino Every (somewhere) and didn't realize that it has an RTC. I'm extremely busy this summer, but sometime later this year, this would be something I'd like to try and implement. Also looks like the ESP32 dev boards have RTC, so I've got some learning and experimentation to do as I haven't yet worked with the RTC. |
Beta Was this translation helpful? Give feedback.
-
While the 32k internal oscillator isn't great on the Atmega4809 it should be good enough for this use case.
|
Beta Was this translation helpful? Give feedback.
-
First of all, thank you for the fork and continuing work on this useful library.
I have a suggestion that I use in my own custom version of Brett's library as seen in this project: https://github.com/ptashek/mb/tree/master/CruiseControl_W124 (PIDConfig and PIDController classes)
My approach is to use a virtual
getClock()
method, which allows me to override it as needed at the point of use. In the project above I'm usingRTC
ticks as my clock, incremented via the RTC periodic interrupt ISR. It's especially useful in projects which need additional timers, or re-configure the TCA clock, renderingmillis()
andmicros()
unusable.The default implementation could still use micros() as it does now.
Beta Was this translation helpful? Give feedback.
All reactions