Hallo

mach mal den Pullup Widerstand an Pin D6 an:

Portd.6=1

müsste dann von der Software funktionieren