阅读背景:

Python相当于Bash命令“echo”?

来源:互联网 

I am trying to trying to control the GPIOs on my RPi with Python but without one of those modules that require root permissions to be used. I found that trivial way of just "echoing" 1 or 0 to the value file of the GPIO through the console. I also wrote a Python script doing this automatically. So far so good. But this only works if the file (in this case: /sys/class/gpio/gpio17) already exists. I could easily create this folder everytime after booting the Pi, through the console like this:I am trying to trying to control the GPIOs on m




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: