 void loop() {
   float t;
   float h;
-  Serial.println("A4 vs. G3 / DHT22 vs. SHT31");
-  /*
   if(readA4()) {
-    Serial.print("A4 :: ");
-    Serial.print("PM 1.0 = ");
+    Serial1.print("A4 ");
+    Serial1.print(pm10);
+    Serial1.print(" ");
+    Serial1.print(pm25);
+    Serial1.print(" ");
+    Serial1.print(pm100);
+    Serial1.print("|");
+#ifdef SERIAL_DEBUG
+    Serial.print("A4 :: PM 1.0 = ");
     Serial.print(pm10);
     Serial.print("   PM 2.5 = ");
     Serial.print(pm25);
     Serial.print("   PM 10 = ");
     Serial.println(pm100);
+#endif
+  } else {
+    return;
   }
   if(readG3()) {
-    Serial.print("G3 :: ");
-    Serial.print("PM 1.0 = ");
+    Serial1.print("G3 ");
+    Serial1.print(pm10);
+    Serial1.print(" ");
+    Serial1.print(pm25);
+    Serial1.print(" ");
+    Serial1.print(pm100);
+    Serial1.print("|");
+#ifdef SERIAL_DEBUG
+    Serial.print("G3 :: PM 1.0 = ");
     Serial.print(pm10);
     Serial.print("   PM 2.5 = ");
     Serial.print(pm25);
     Serial.print("   PM 10 = ");
     Serial.println(pm100);
-  }
-  */
+#endif
+  } else {
+    return;
+  }
   t = sht31.readTemperature();
   h = sht31.readHumidity();
   delay(100);
   if(!isnan(t) && !isnan(h)) {
+    Serial1.print("SHT31 ");
+    Serial1.print(t);
+    Serial1.print(" ");
+    Serial1.print(h);
+    Serial1.print("|");
+#ifdef SERIAL_DEBUG
     Serial.print("SHT31 :: temp=");
     Serial.print(t);
     Serial.print("   hum=");
     Serial.println(h);
+#endif
   } else {
     t = -1;
     h = -1;

  pm25 = -1;
  pm100 = -1;
  memset(buf, 0, 32);
  for(x = 0; x < 32;) {
    if(a4.available()) {
      data = a4.read();


// A4 pin 1   -> +5V
// A4 pin 2   -> GND
// A4 pin 5   -> 7688 Duo pin D11
// G3 pin 5   -> 7688 Duo pin D9
// SHT-31 SDA -> 7688 Duo pin D2
// SHT-31 SCL -> 7688 Duo pin D3
// DHT-22 DAT -> 7688 Duo pin D4

#include <stdarg.h>
#include <Wire.h>
#include <SoftwareSerial.h>
#include <Adafruit_SHT31.h>
#include <DHT.h>
#include <AM2321.h>

#define SERIAL_DEBUG  true  // Comment to disable it

#define DHTTYPE DHT22
#define DHTPIN  4
#define G3PIN   8
