How is it possible to ever have frequency on a DC circuit?
"DC" is a lot like saying "frictionless".  There are two ways you could define them:


DC is zero frequency.  Frictionless is zero friction.
Any frequency that is too small for us to care about (i.e. too long in time) is DC.  Any friction that is too small for us to care about is frictionless.


Definition #1 is a nice theoretical definition.  There is no ambiguity about what it means: zero is zero.  It's what you will often find in textbooks.

Definition #2 is more practical.  No natural cycle has zero frequency, as its period would be an infinite amount of time.  Every mechanical system has some friction.  But in both cases, these effects may be so small that we don't care about them.  So we can treat them as if they are zero.

So what frequency is the cutoff for DC?  It varies with each problem, and is sometimes a matter of opinion.  Part of being an EE is knowing when you can assume that things are in steady-state.



As for your Arduino question... You give it a signal, and it tries to determine the frequency of it.  It's not magic; there is an algorithm involved.  The algorithm has a minimum and maximum frequency; you are correct that it returns -1 if the signal seems to be above the maximum or below the minimum frequency.

Here's why.  Suppose the software can read frequencies as low as 1 Hz.  That means in the worst case, you would have to wait 1 second (*note 1) to find the frequency.

Now suppose you change the minimum frequency to 0.1 Hz.  The worst-case waiting time will be 10 seconds.  At 0.001 Hz, 1000 seconds.  As the frequency approaches the "ideal" zero frequency of DC, the waiting time will become inifite.

You don't want to wait forever to have the algorithm tell you that you are at DC.  Therefore, it will return -1 unless it has found a frequency in the correct range.



(*note 1) Yeah, maybe 0.5 second because of the Nyquist rate.  It still doesn't change my argument that the waiting time becomes infinite.