在覆盆子皮上收发莫尔斯电码的python库
morsepla的Python项目详细描述
摩尔斯播放
morseplay是一个python库,用于发送和接收覆盆子pi上的morse代码。
安装和使用
$ pip install morseplay
或者如果你喜欢生活在流血的边缘:
$ python setup.py install
查看这些示例以了解如何使用morseplay:
>>>importmorseplay>>>importRPi.GPIOasGPIO# Let's try sending morse signals from an LED>>>LED=morseplay.OutputMorse(outpin=17,setmode=GPIO.BCM,delay_unit=0.3)# This will signal "hello" in morse from LED attached to pin 17>>>LED.send("hello")# You can also run the signal in background by returning a Thread instance>>>signal=LED.send("hello",threaded=True)>>>signal.start()# Output custom morse code>>>LED.send("-.-- ---",morse=True)# Note that letters are separated by 3 spaces and words are separated# by 7 spaces
贡献
错误报告、功能请求甚至文档改进是最重要的 欢迎!