Python 在L和H位置连接Pir传感器。怎样。?

Python 在L和H位置连接Pir传感器。怎样。?,python,raspberry-pi,sensors,Python,Raspberry Pi,Sensors,我正在看这篇文章 我看到了一个叫做“重新触发”的部分。有两种定位 L位置 H位置 L位置,当LED在其前面移动时,LED不会保持点亮,但实际上每隔一秒钟左右就会打开或关闭一次。但在H位置LED确实会在物体移动的整个时间内保持点亮 这是程序的输出 pi@nikhilbhagath:~/pi/occupied-device $ python pir.py ('Motion detected! ', True) ('Motion detected!', False) ('Motion detected

我正在看这篇文章 我看到了一个叫做“重新触发”的部分。有两种定位

  • L位置
  • H位置
  • L位置,当LED在其前面移动时,LED不会保持点亮,但实际上每隔一秒钟左右就会打开或关闭一次。但在H位置LED确实会在物体移动的整个时间内保持点亮

    这是程序的输出

    pi@nikhilbhagath:~/pi/occupied-device $ python pir.py
    ('Motion detected! ', True)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected! ', True)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected! ', True)
    ('Motion detected! ', True)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected! ', True)
    ('Motion detected! ', True)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ('Motion detected!', False)
    ^Z
    [35]+  Stopped                 python pir.py
    pi@nikhilbhagath:~/pi/occupied-device $
    
    但我希望我的LED能保持更长时间。我怎么做


    多谢各位

    L位置用于切换LED,在实际中没有太多用途,在H位置,当运动较低时,LED将保持高位。您能告诉我在PIR中H位置是如何实现的吗?