Pins 0 and 1 are used by Serial. Choose another one and your sketch will work.
See Greynomad pinout diagram for the DUE.