relay.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:BoilerPlate 作者: wyaron 项目源码 文件源码
def test_relay():
   """Test relay on and off cycle"""

   # check if the output is high
   print 'current control output is: ', is_output_high(), ' (should be off)'

   # start the relay
   start_relay()

   print 'current control output is: ', is_output_high(), ' (should be on)'

   # setup a timer to stop the relay after 5 seconds
   t = Timer(5, stop_relay)
   t.start()

   # wait for the timer to finish
   t.join()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号