小编use*_*694的帖子

OSError:[errno2]没有这样的文件或目录

我试图从pir传感器获取信号,将其传输到Web服务.当我运行此代码时

if Current_State==1 and Previous_State==0:
  # PIR is triggered
    output =  subprocess.check_output(["Current_State==1 and enter code herePrevious_State==0","18"]);
     print "  Motion detected!"
     # Tell the Pi to run our speech script and speak the words
     # motion dtected! - anything after the .sh will be read out.
    enter code here` matches = re.search("Current_State==1 and Previous_State==0", output)
     move = int(matches.group(1))
     resultm = client.service.retrieveMove(move)
Run Code Online (Sandbox Code Playgroud)

我收到了这个错误

**Traceback (most recent call last):
  File "pir_5.py", line 48, in <module>
    output =  subprocess.check_output(["Current_State==1 and Previous_State==0", "18"]);
  File "/usr/lib/python2.7/subprocess.py", …
Run Code Online (Sandbox Code Playgroud)

python raspberry-pi

0
推荐指数
1
解决办法
2866
查看次数

标签 统计

python ×1

raspberry-pi ×1