- ZigBee獲取數(shù)據(jù)回調(diào)方法
1.獲取溫度 public void getTemperature(String ,new OnTemperatureRespones)
2.獲取濕度 public void getHum(String ,new OnHumRespones)
3.獲取人體 public void getPerson(String ,new OnPersonRespones)
4.獲取光照 public void getLight(String ,new OnLightRespones)
5.獲取空氣 public void getCo(String ,new OnCoRespones)
6.獲取氣體 public void getFiregas(String ,new OnFiregasRespones)
7.獲取火焰 public void getFire(String ,new OnFireRespones)
8.獲取通道 public void getValue(String ,new OnValueRespones)
- 打開ZigBee串口
ZigBeeServiceAPI.openPort(int com(串口號),int mode(區(qū)分USB串口還是Com串口),int baudRate(波特率))
波特率 0=1200,1=2400,2=4800,3=9600,4=19200,5=38400 6=57600 7=115200,8=230400,9=921600
-關(guān)閉ZigBee串口
ZigBeeServiceAPI.closePort()