标签:blog http io ar os sp on 2014 art
//下面是要上传主机的
DEFINE_DEVICE
M_COM = M:2001:COM; //默认ID为2001
tp = T:10:TP; //设置的控制PC或平板的ID
DEFINE_COMBINE
DEFINE_CONSTANT
DEFINE_VARIABLE
DEFINE_FUNCTION
DEFINE_TIMER
DEFINE_START
SET_COM(M_COM,1,38400,8,0,10,0,232); //串口初始化
DEFINE_EVENT
BUTTON_EVENT(tp,1) //第一组灯最亮
{
PUSH()
{
SEND_COM(M_COM,1,"0xAA21482C25602B5E2E5130BF");
}
}
BUTTON_EVENT(tp,2) //第一组灯关闭
{
PUSH()
{
SEND_COM(M_COM,1,"0xAA21482C60602B5E2F5530BF");
}
}
DEFINE_PROGRAME
//用户界面的设计
Host IP:是主机的IP, 192.168.1.20.此地址可以设置
Device ID:就是主机程序里面添加的设备ID
获取,更改主机IP的方法(主机编码软件里面的功能).
标签:blog http io ar os sp on 2014 art
原文地址:http://www.cnblogs.com/lwngreat/p/4115502.html