Run this test program for GPIO27 In a separate Terminal, enter You should see GPIO 27 go ACTIVE and INACTIVE:
Code:
import gpiodimport timefrom gpiod.line import Direction, ValueLINE = 27with gpiod.request_lines( "/dev/gpiochip0", consumer="read-example", config={ LINE: gpiod.LineSettings(direction=Direction.INPUT) },) as request: while True: x = request.get_value(LINE) time.sleep(1) print ("GPIO 27 =",x)
Code:
pinctrl set 27 op dhpinctrl set 27 op dh
Code:
GPIO 27 = Value.INACTIVEGPIO 27 = Value.ACTIVE
Statistics: Posted by neilgl — Sat Sep 14, 2024 4:08 pm