global initialization of initial scan state
add macros to interface with AVR pins
remove unnecessary comment
clarify purpose of buffer size value