Improving accuracy

Thanks to the readonly old Arduino forum I noticed only today that the author of the DCF77 code I am currently using published an update, nearly a year ago.

He wrapped it in a nice library, which makes it a lot easier to use. Sadly it doesn’t work on version 1.0 of the Arduino UI, so I reverted to version 0022 for now. There are newer “old” versions of the UI, but I had this version still installed.

This is the example from the library:

#include "Dcf77.h"
 
Dcf77 dcf77(0); 
 
void setup() {
Serial.begin(9600);
}
 
void loop() {
const char *v = dcf77.getDateTime();
if (strcmp (v,"DCF77POLL") != 0) {
Serial.println(v);  
}
}

The library takes care of parity and plausability checks, so I don’t have to worry about that anymore. The downside is that it produces the current time far less frequent than the code I’m using now, but when it returns one it is correct.

I’m still leaning toward adding a realtime clock to the clock. This way I can rely on the RTC for the current time and correct it now and then when I get a signal from the DCF receiver.