SHARE
TWEET

Untitled

a guest Jan 21st, 2020 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int sensorsCount = 2;
  2. int dhtCount = 1;
  3.  
  4. String dataString = '';
  5.  
  6. for (int i = 0; i < sensorsCount; i++) {
  7.     if (dataSting != '') {
  8.        dataString += ',';
  9.     }
  10.     dataString += String(sensors.getTempCByIndex(i));
  11. }
  12.  
  13. for (int j = 0; j < dhtCount; j++) {
  14.     if (dataSting != '') {
  15.        dataString += ',';
  16.     }
  17.     int t = dht.readTemperature(j);
  18.     int w = dht.readHumidity(j);
  19.     dataString += String(t) + ',' + String(w);
  20. }
  21.  
  22. delay (1000);
  23. Serial.print(dataString);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top