Not holding pins to ground

Hello all

I have a Pro Mini, with an 8 pin dip switch wired onto pins 2-9. 10k resistor from each pin to ground, and the other side of the dip switch is 5v.

But.... it's reading some of the pins as high? If I short the offending pin to ground ,it goes away.

4k7 pull downs don't help, and I didn't really want to go right down to 1k pull downs, as that seems excessive. Especially if all the dip switches were operated.

Any ideas what would cause this? (Supply is a very smooth 5v)

Show us a good schematic & image of your circuit wiring.
Posting images:
http://forum.arduino.cc/index.php?topic=519037.0

Use CTRL T to format your code.
Attach your sketch between code tags.
[code]Paste your sketch here[/code]

Typical input connections:
2017-08-05_20-33-24.jpg

The more information we get, the sooner we can offer suggestions.

Does it prototype board with mechanical connections? If it is - recheck GND at pulldown resistors.

If you have buttons with 4 pins, you should know that adjacent pairs of the pins are connected. Rotate the offending buttons by 90° on your breadboard and try again.

Since you are using pull-down resistors make sure you did not enable the internal pull-ups. ;)

BTW - It's usually easier to use the internal pull-ups and use the switch to pull the input down. Since that's apparently the opposite of what you want, you can invert the logic in software or turn the DIP-switch upside down.

Many thanks

Problem was my OLED library was using pin 4 as a reset, but not listed in my code. I changed the library pin and now it's cleared the issue.

Side request... anyone know of a reliable way of interfacing my 8 pin dip switch without using up 8 pins? It sets a DMX address, so it needs to be reliable.

I thought of either some logic using diodes over 4 pins, or a resistor on each switch, read with analogue in. Not sure the resistor idea will be reliable enough

You can use a shift register or I2C/SPI port expander.

Thanks, I will look into that. Looking into it further, you can't really use resistance or diodes, as you need to know the state of all the switches individually at the same time.