Shift Register Code from http://ardx.org/CODE05