Hi,
I am trying to toggle led using Apalis Evaluation Board IMX8QM on Visual Studio Code using Python
Followed this link to setup Visual Studio Code : Python Development and Debugging on TorizonCore Using Visual Studio Code (toradex.com)
Please let me know how it has to be done since I am getting an error when I type this code specifically at import gpiod
import gpiod
import time
chip=gpiod.Chip('gpiochip0')
lines = chip.get_lines([ 12 ])
lines.request(consumer=‘gpio’, type=gpiod.LINE_REQ_DIR_OUT)
lines.set_values([ 0 ])
counter = 0
while counter < 5:
lines.set_values([1])
time.sleep(1)
lines.set_values([0])
time.sleep(1)
counter = counter +1
exit()