Refactor to handle old and new Arduino versions without code duplication, as suggested by #14.
Merge pull request #28 from adafruit/refactor_arduino

Refactor to handle old and new Arduino versions without code duplication as suggested by #14.