Making a LED switch but it's a bit more complex

There are always more details the deeper you look -- Ganssle's Part 1 has some cool plots: