No announcement yet.

Problem with digital pin 10

  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with digital pin 10

    I'm clutching at straws here but.....

    Pin D10 when set for input is permanently HIGH and I'm unable to pull it LOW at all, e.g. via a momentary switch connected between the pin and gnd. On every other pin, my very simple app works fine (it's code for a rotary encoder with the switch connected to a digital pin.) On pressing the rotary encoder, any pin I try is pulled low, except when connected to D10.

    I've tested the pin with an LED connected and in OUTPUT mode, D10 seems ok, I can write HIGH and LOW and the LED goes on and off. I then tested it with D4 set to alternate output HIGH and LOW with D10 set to read the value and then output it on D11 to an LED. I tested the code with a different pin first and as expected the LED goes on and off; with D10 the LED is permanently on. As I say, I can't pull it LOW when set to INPUT.

    Is there anything special about D10 that I don't know or is it likely duff? I've not actually used it for anything until today so I've not accidentally connected a high voltage or current to it.


  • #2
    Hi Andrew,

    I've just tried a simple program and it appeared to work fine.

    pinMode(10, INPUT_PULLUP);
    } // end Setup **do not alter, remove or duplicate this line**

    void loop()
    Display.gfx_MoveTo(10, 10);

    D10 doesn't appear to have any other purpose that could affect it's use. D10 is sometimes the preferred pin for SS if using an SPI connected device but other than that I can't see any reason why it isn't functioning the way it should.

    Best regards



    • #3
      Thanks Paul - in fact, that code would work for me too as INPUT_PULLUP would make it HIGH. What happens if you try and pull it LOW externally, then read it - I assume it has no pull-down resistors built in like other Arduinos? I guess it doesn't matter really - the only hope I had was that it was hooked to something else on the board I wasn't aware of. Looks like it's broken - do these have warranty or anything like that? I've not used these digital pins before and the only thing I've had connected to it is a rotary encoder powered by the 4Duino itself.