Low pass filter algorithm origin
I tried to make my derivation match up exactly with embeddedrelated's. The filter you cited uses an approximation, which further obfuscates intuitively understanding it. 

embeddedrelated does cite the frequency transfer function that the IIR filter is based off of:
$$
H(s)=\frac{1}{1+s\tau}
$$

The transfer function for a simple RC low pass filter is:
$$
H(s)_{RC}=\frac{1}{1+sRC}
$$
$$
\tau=RC
$$

Schematic:



We can derive a difference equation from the above schematic.

$$
I=C\frac{dV_{out}}{dt}
$$
$$
I = \frac{V_{in} - V_{out}}{R}
$$
$$
C\frac{dV_{out}}{dt}=\frac{V_{in} - V_{out}}{R}
$$
$$
C\frac{V_{out}[n]-V_{out}[n-1]}{ts}=\frac{V_{in}[n] - V_{out}[n]}{R}
$$
$$
V_{in}[n]+\tau f_s V_{out}[n-1]=\tau f_s V_{out}[n] + V_{out}[n]
$$
I have tested this form:
$$
\frac{V_{in}[n]+\tau f_s V_{out}[n-1]}{\tau f_s + 1}=V_{out}[n]
$$
$$
\tau f_s &gt;&gt; 1
$$
I have not tested this form:
$$
\frac{V_{in}[n]}{\tau f_s} + V_{out}[n-1]\approx V_{out}[n]
$$