V02.00 | 2021/05
63
# read GPIO:
try:
# set direction to read DXP
fo = open("/sys/class/gpio/gpio" + ports[1] +"/direction", "w")
fo.write("in")
fo.close()
# set active low to get the right value...
fal.write("1")
fal.close()
# read DXP: fr = open("/sys/class/gpio/gpio" + ports[1] +"/
value", "r")
val=fr.read()
fr.close()
print(val)
except:
# export gpio if not done as yet
f1 = open("/sys/class/gpio/export", "w")
f1.write(ports[1])
f1.close()
# set direction to read DXP
fo = open("/sys/class/gpio/gpio" + ports[1] +"/direction", "w")
fo.write("in")
fo.close()
# set active low to get the right value...
fal.write("1")
fal.close()
# read DXP:
fr = open("/sys/class/gpio/gpio" + ports[1] +"/value", "r")
val=fr.read()
fr.close()
print(val)
Summary of Contents for 100000897
Page 1: ...Your Global Automation Partner Instructions for Use TN UHF LNX UHF Reader...
Page 2: ...2 Hans Turck GmbH Co KG T 49 208 4952 0 F 49 208 4952 264 more turck com www turck com...
Page 69: ...V02 00 2021 05 69 fclose fh else printf failed on writing n return 1...
Page 75: ...V02 00 2021 05 75 else printf failed on writing n return 1 return EXIT_SUCCESS...
Page 93: ...V02 00 2021 05 93 Select RS485 RFID and confirm with OK Fig 67 Selecting the RS485 interface...
Page 97: ...V02 00 2021 05 97 Click the Select BL File button Fig 73 Button selecting a BL file...