Suggestions on code for reading square wave input