this is my buzzer.py, I can run this code when I do not activate python3-venv, but I cannot run when I activate python3-venv
I tried pip3 install gpiod when I activate venv, line4's gpiodchip4 -> /dev/gpiodchip4 and lot's of things. Give me answer plz
import gpiod
import time
PIN=17
chip=gpiod.Chip('gpiodchip4')
led_line = chip.get_line(PIN)
led.line.request(consumer="BUZ", type=gpiod.LINE_REQ_DIR_OUT)
try :
while True :
led_lne.set_value(1)
time.sleep(1)
led_line.set_value(0)
time.sleep(1)
finally :
led_line.release()
I tried pip3 install gpiod when I activate venv, line4's gpiodchip4 -> /dev/gpiodchip4 and lot's of things. Give me answer plz
import gpiod
import time
PIN=17
chip=gpiod.Chip('gpiodchip4')
led_line = chip.get_line(PIN)
led.line.request(consumer="BUZ", type=gpiod.LINE_REQ_DIR_OUT)
try :
while True :
led_lne.set_value(1)
time.sleep(1)
led_line.set_value(0)
time.sleep(1)
finally :
led_line.release()
Statistics: Posted by rkdtmdals — Tue May 28, 2024 6:49 am