this closes issue #2198

In this way the problem doesn't subsist any more because  pinMode checks if pin is digital and if so disable ADC when pin is declared as OUTPUT and enable it if declared as INPUT