codey_broadcast
codey_broadcast 模块的主要功能与函数(因为是系统函数,所以使用时不需要带模块名称)
codey.
broadcast
可以向串口,蓝牙以及自身的事件监听单元发送一个广播,参数:
str 广播的内容。
import codey import event @event.button_a_pressed def button_a_cb(): print("button a event succeeded") codey.broadcast("hello") @event.received("hello") def received_cb(): print("received message: hello")