Only write to serial from within 'loop'. Debugging disabled.
Refactor pin determination