【发布时间】:2016-03-25 13:25:51
【问题描述】:
我正在尝试使用pyserial 与直接连接到我的 PC 的 z1 mote 进行通信。我要做的是写信给mote,在收到命令后,mote应该回复当前的温度读数,例如。
Python 端可以是这样的 (iinm)
import serial
ser = serial.Serial(0)
ser.write("hello") # the mote will receive the message and do something
但我不知道如何在使用 C 的 z1 mote 端接收消息。是否有特殊的方法来接收命令或者我必须创建自己的?
非常感谢任何提示和提示。
【问题讨论】: