I'm using an Arduino Nano 33 BLE Sense board. On this board, D5 and D6 are not behaving correctly. I'm trying a simple test with no other hardware connected:
const int pinD5 = 5; // P1.13
const int pinD6 = 6; // P1.14
void setup() {
// Configure D5 and D6 as outputs
pinMode(pinD5, OUTPUT);
pinMode(pinD6, OUTPUT);
// Initialize both pins to LOW
digitalWrite(pinD5, LOW);
digitalWrite(pinD6, LOW);
}
void loop() {
// Set D5 and D6 HIGH
digitalWrite(pinD5, HIGH);
digitalWrite(pinD6, HIGH);
delay(1000); // Wait 1 second
// Set D5 and D6 LOW
digitalWrite(pinD5, LOW);
digitalWrite(pinD6, LOW);
delay(1000);
}
When I measure voltages, D6 always shows 3.3v and doesn't change. D5 fluctuates between about 1.6v and 2.1v every second.
I also tried a test with reading them as inputs. They always show a HIGH value and it never changes.
No other IO I've found so far has these issues. Just D5 and D6.
What's going on here?