Nano 33 IoT INPUT_PULLUP pins Inconsistent

I have just got a nano 33 IoT and have been struggling to get consistent functionality for a simple set of internal_pullup switched on the digital pins.

I set all of the pins to pinMode(n, INPUT_PULLUP); [where n is the pin number from 0 - 13]. When I digitalRead(n) each of the pins i get the following:

D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13
digitalRead(pin) 1 1 0 1 0 1 1 0 0 1 1 1 1 1

The only relationship I can see is that on the screen print of the pin names on the board I notice that D4, D7, D8 all lack a little dash below their name but all the other pins have one.

But then to confuse matters pin D2 does have a dash under its name which would suggest logically that it should read high not low.

Frustrated and confused... any thoughts?

@hapartnerships, your topic has been moved to a more suitable location on the forum.

The dash (or ~) usually indicates a PWM capable pin.

OK, that is a useful bit of info and something common for those pins that are not responding as expected - is it the case that a digital pin without PWM capability cannot be set to INPUT_PULLUP
or something of that nature?

Or is my board just malfunctioning?

I just did a quick test on my Arduino Nano 33 IoT. I switched every pin to Output LOW first for 5ms and then switched to Input with pullup and read the pin the next instruction.
Every pin read 0 when output low and 1 when input pullup as expected.

Probably a silly question, but are you 100% sure that there's nothing connected to those pins that could drag them down?

Thanks @Klaus_K for confirming what correct functionality should be; that is what I had expected to happen.

@anon12459472 I came to realise long ago there is no such thing as a silly question!!!

I have tested it with just the USB cable attached and nothing on any of the pins and it is the same.

I assume it must be a dud board but can't understand why only those pins are not functioning. I will return it and get a replacement.

Yeah - given the low-cost of these components I find it's often easier to just swap-out enough things until it works and then swap things back to find which component(s) stop it working. It's usually shortly after that I have an "ah-ha" moment.

Might also be an interesting insight to set those pins high as outputs and then see if they go high (and perhaps test them with a physical pullup/down resistor) - could just be that the input has had a good static zap and is non-functional?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.