Snippet Tag: wireless sensor network

Wireless Sensor Network Temperature Humidity Sensor

///this code is written and tested for ncd.io wireless temperature humidity sensor with arduino due ///sensor data structure can be found here https://ncd.io/long-range-iot-wireless-temperature-humidity-sensor-product-manual/ /// sesnro can be found here https://store.ncd.io/product/industrial-long-range-wireless-temperature-humidity-sensor/ uint8_t data[29]; int k = 10; int i; void setup() { Serial1.begin(9600); Serial.begin(9600); Serial.println("ncd.io IoT Arduino wireless temperature Humidity sensor"); } void loop() { if (Serial1.available()) { data[0] = Serial1.read(); delay(k); if(data[0]==0x7E) { while (!Serial1.available()); for ( i = 1; i< 29; i++) { data[i] = Serial1.read(); delay(1); } if(data[15]==0x7F) /////// to check if the recive data is correct { if(data[22]==1) //////// make sure the sensor type is correct {

Read More »