在非PI设备上模拟rpi.gpio包的占位符包
rpi-gpio-emu的Python项目详细描述
此包提供占位符以模拟其他设备上的rpi.gpio包功能。
可以使用“out”关键字参数设置函数“input”、“getmode”、“event_detected”的预期输出以及“wait_for_edge”的延迟时间(秒)。 否则,这些函数的输出是随机的,除了“wait_for_edge”是1秒。
其余函数“add_event_callback”、“add_event_detect”、“cleanup”、“getmode”、“gpio_function”、“output”、“remove_event_detect”、“setmode”、“setup”和“setwarnings”都不起作用。
有关rpi.gpio的示例和文档,请访问http://sourceforge.net/p/raspberry-gpio-python/wiki/Home/
项目页面:https://github.com/aharshac/rpi-gpio-emu
更改日志
0.0.1
- 基于rpi.gpio 0.6.5