Update to work with Due

Changes to work with Arduino Due
Merge branch 'Due'