shizimi 0 Posted August 31, 2022 I am programming with reference to the sample. How can I see the 0,1 of the GPIO? The 29th pin shows 3.3V when I look at it with a tester. It will be 0 when printed. import ASUS.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setup(29, GPIO.IN) print(GPIO.input(29)) Share this post Link to post Share on other sites
yi-hsin_hung 3 Posted August 31, 2022 Hi @shizimi: How do you measure the 29 pin about 3.3v? Could you help to read the value of 29 pin by "gpio readall" command. Thank a lot! Share this post Link to post Share on other sites
shizimi 0 Posted September 2, 2022 The 29th pin is set to 1 in the gpio readall command. 3.3V was measured with a voltmeter between GND and pin. I'm not sure why, but inserting add_event_detect solved it. why? import ASUS.GPIO as GPIO GPIO.setmode(GPIO.BOARD) GPIO.setup(29, GPIO.IN) GPIO.add_event_detect(29, GPIO.BOTH) print(GPIO.input(29)) # <- 1 Share this post Link to post Share on other sites
yi-hsin_hung 3 Posted September 2, 2022 Hi @shizimi: Could you try the other gpio pin about the condition. I can't reproduce the issue by local test. Thank a lot! Share this post Link to post Share on other sites