Open vishchoudhary100 opened 3 months ago
I solved the issue by using the following code
def get_ac_power_status(): PLD_PIN = 6 with gpiod.request_lines( "/dev/gpiochip4", consumer="get-line-value", config={PLD_PIN: gpiod.LineSettings(direction=Direction.INPUT)}, ) as request: value = request.get_value(PLD_PIN) return True if value == Value.ACTIVE else False
When I try to run the merged.py file, it show the error that 'Chip' object has no attribute 'get_line' File "/data/nvme/vscode/pi_status/stats/merged.py", line 55 pld_line = chip.get_line(PLD_PIN)
I am using a Raspberry pi 5 with X1201 UPS board