digitalRead() always HIGH

Hello,

I've been struggling with an issue on a couple of different Nano BLE boards. digitalRead() always returns HIGH no matter what voltage the input pin reads via DMM.

I connected pin 4 to pin 14 (GND) via a 4.7KO resistor but digitalRead kept reporting HIGH. I also jumpered 4 to 14 directly with the same results. Occasionally, I do get a LOW reading, but it is short lived (reported only for a few seconds) before going back to HIGH. That happens fairly rarely when I handle the clips that attach to the two pins.

I eliminated all extra stuff I could. I have a clip with one end on 4, the other on 14. No breadboard.

I also tried pin 28 with the same results.

Everything I read online about this issue had to do with the OP floating the pin and expecting a LOW. I am GROUNDING it. I am sure I am missing something obvious.

const int DRDY = 4;


int drdy;


void setup() {
  pinMode(DRDY, INPUT);
  Serial.begin(500000);
  delay(100);
}


void loop() {
  drdy = digitalRead(DRDY);
  Serial.println(drdy);
  delay(300);
}

Here is my code:

Sounds like a bad connection, floating. Did you solder the connections?

Or, if the nano with header pins is inserted into a breadboard, are the header pins properly soldered?

Post a clear close up photo of your setup (attach it to the post rather than use a hosting service).

This could be a pin number confusion.

Arduino pin numbers (the values you pass to digitalRead etc) are not necessarily the same as package
pin numbers, although most Arduinos have the Arduino pin numbers silk-screened onto the PCB to
help with this.

Pin 14 being ground implies you are using package pin numbers, since the Arduino pins are all
signal inputs and outputs.

Pin 4 on the package is unlikely to be the same as Arduino pin 4.

The Arduino pin numbers are marked on the silkscreen on the bottom of the Nano 33 BLE board. You won't be able to see them if you have the board on a breadboard, but you can use the pinout from the product page:
https://store.arduino.cc/usa/nano-33-ble


The Arduino pin numbers are in the white and orange striped labels.

I apologize for the late reply. I was banned as I was posting a picture of my setup.

The pin numbers were the issue.