擅长:python、mysql、java
<p>我无法测试它,但<code>pir.wait_for_no_motion()</code>会在第一个图像之后停止循环,因此无法获得更多图像。如果必须拍照,则必须使用<code>pir.motion_detected</code>进行测试</p>
<pre><code>while True:
if pir.motion_detected:
filename = "pircam-" + datetime.now().strftime("%Y-%m-%d_%H.%M.%S.%s.jpg")
camera.capture(filename)
block_blob_service.create_blob_from_path(...)
</code></pre>
<p>我是根据<a href="https://static.raspberrypi.org/files/education/posters/GPIO_Zero_Cheatsheet.pdf" rel="nofollow noreferrer">GPIO_Zero_Cheatsheet.pdf</a>写的</p>