Snippet Tag: arduino wireless temperature sensor project

IoT Arduino wireless 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-wireless-temperature-humidity-sensor/ /// sesnro can be found here https://store.ncd.io/shop/ int8_t data[29]; int ledpin=13; int chk=1; 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

Read More »