Open drf5n opened 1 year ago
Requires some thought about how to handle this.
Here's a solar tracker simulation with text-based 0 padding and steppers:
https://wokwi.com/projects/362461186756144129
And without the zero padding on the times:
It isn't that I don't understand the issue. I want to have an overview of all the code before just patching it.
This is just an example and it's up to the programmer to interpret the data. I am using the library in my solar tracker with no problems so I think discussion of sample code is a waste of time.
I realize it's a nit-picking little thing. Feel free to close with a "won't fix" because the fault lies with Arduino's lack of a Serial.printf("%02d:",0);
I like your library, and am going to use it to build a tracker with steppers like the Wokwi simulation. Thanks.
I'm planning to re-write the example using the JeeLabs/Adafruit RTC library because it has a built in function for formatted text output.
The solarTimeRTC example is missing leading zeros on the time elements, and could print ugly times like:
https://github.com/KenWillmott/SolarPosition/blob/ba19df4b971837592b78930d4baed061b2b45ac8/examples/solarTimeRTC/solarTimeRTC.ino#L80-L92
A few lines like this would solve it:
Here's a configured simulation:
https://wokwi.com/projects/362382128060882945