Using D0 and D1

Did you make a pinMode call to set them to be outputs? It would help if you posted your code.