OpenMV N6 and P7 used as imput dosen't work as expected

Hi,
on my N6 I’m trying to use P7 as input pin , but reading the pin return always 0 also if connected to 3,3v and is configured with PULL_DOWN. The same script using P8 works fine and P7 used as ouput works fine .
Are there imitation in the usage of P7 as input on N6 camera ?
tks Roberto.

Hi, there should be no issues with using that pin as an input. It works as expected with pull down and up and reads the voltage correctly.

from pyb import Pin

# Connect a switch to pin 0 that will pull it low when the switch is closed.
# Pin 1 will then light up.
pin0 = Pin("P7", Pin.IN, Pin.PULL_DOWN)
import time

while True:
    print(pin0.value())  # Print the value of pin 0 (1 = high, 0 = low).
    time.sleep_ms(100)  # Wait for 100 milliseconds.

And

from pyb import Pin

# Connect a switch to pin 0 that will pull it low when the switch is closed.
# Pin 1 will then light up.
pin0 = Pin("P7", Pin.IN, Pin.PULL_UP)
import time

while True:
    print(pin0.value())  # Print the value of pin 0 (1 = high, 0 = low).
    time.sleep_ms(100)  # Wait for 100 milliseconds.

Both work.

Hi , I’ve tryed both version on p7 and dosen’t works , while with P8 are both ok.

Using the below code P7 as output works fine and if I swap P7 with P8 not.
At this point I can just suppose that I’ve damaged the P7 in such way , also if I’m sure to have provided input voltage not above 3,3 volts. :thinking:

# Pin Control Example

from machine import Pin

pin0 = Pin("P8", Pin.IN, Pin.PULL_UP)
pin1 = Pin("P7", Pin.OUT)

while True:
    pin1.value(not pin0.value())

The N6 is not 5V tolerant. So, if you did provide 5V then the I/O is damaged.