I am trying to use the GPIO3 pin to do bidirectional IO with the Pico SDK. I am porting an application which was written using another library for the Pico where it worked as expected.
In my implementation, writing to the pin with gpio_put works without a problem. I am initialising the pin as follows
To read from the pin, I change the direction with the following functionThe pin appears to be always low on the oscilloscope. Using gpio_get I always get a 0. What is the correct way to switch a pin from output to input?
In my implementation, writing to the pin with gpio_put works without a problem. I am initialising the pin as follows
Code:
gpio_init(PIN3);gpio_set_dir(PIN3, GPIO_OUT);gpio_put(PIN3, 0);
Code:
gpio_set_dir(PIN3, GPIO_IN);
Statistics: Posted by szoshi — Wed Jan 24, 2024 7:11 am