你好 one@UB1036:~/MPIO-10-DemoX$ ls air_pressure_read.py led_button_control.py LICENSE testGoodmpio10.py led_blink.py led_toggle.py README.md touch_read.py one@UB1036:~/MPIO-10-DemoX$ sudo python3 testGoodmpio10.py [sudo] one 的密碼: sh: 1: cannot create /sys/class/gpio/gpio1/direction: Directory nonexistent sh: 1: cannot create /sys/class/gpio/gpio0/direction: Directory nonexistent sh: 1: cannot create /sys/class/gpio/gpio0/value: Directory nonexistent Traceback (most recent call last): File “/home/one/MPIO-10-DemoX/testGoodmpio10.py”, line 12, in gpio1 = open(“/sys/class/gpio/gpio1/value”, “r”) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: ‘/sys/class/gpio/gpio1/value’ one@UB1036:~/MPIO-10-DemoX$ 請問無法執行,如何open 謝謝 回覆
你好
one@UB1036:~/MPIO-10-DemoX$ ls
air_pressure_read.py led_button_control.py LICENSE testGoodmpio10.py
led_blink.py led_toggle.py README.md touch_read.py
one@UB1036:~/MPIO-10-DemoX$ sudo python3 testGoodmpio10.py
[sudo] one 的密碼:
sh: 1: cannot create /sys/class/gpio/gpio1/direction: Directory nonexistent
sh: 1: cannot create /sys/class/gpio/gpio0/direction: Directory nonexistent
sh: 1: cannot create /sys/class/gpio/gpio0/value: Directory nonexistent
Traceback (most recent call last):
File “/home/one/MPIO-10-DemoX/testGoodmpio10.py”, line 12, in
gpio1 = open(“/sys/class/gpio/gpio1/value”, “r”)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory:
‘/sys/class/gpio/gpio1/value’
one@UB1036:~/MPIO-10-DemoX$
請問無法執行,如何open 謝謝