I have just started using micropython running on an Arduino Nicla vision board. I am trying to detect april tags and turn a GPIO pin high. I am able to detect april tags using one of the examples provided. I am using the following code to turn one of the GPIO pin(D3 as per Arduino pinout diagram)
import pyb
import time
ledGreen = pyb.LED(2)
ledRed = pyb.LED(1)
g = pyb.Pin('D3', pyb.Pin.OUT_PP)
print( g.value())
g.value(1)
print( g.value())
while(True):
ledGreen.on()
ledRed.off()
time.sleep(0.5)
ledGreen.off()
ledRed.on()
time.sleep(0.5)
While running the script I can see the LED is changing colour, but measuring the voltage across D3 and GND pin, I a not seeing any voltage. What am I doing wrong, any help is much appreciated. Thanks