Test program for SPS30

Dependencies:   SPS30-sensor

Revision:
0:732c556ef648
Child:
1:6a9693f310f7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jan 23 10:04:44 2019 +0000
@@ -0,0 +1,27 @@
+#include <string>
+#include "mbed.h"
+#include "src/sensor_driver.h"
+
+using namespace std;
+
+Serial pc(SERIAL_TX, SERIAL_RX);
+
+int main()
+{
+    pc.printf("Hello World\r\n");
+    int count = 0;
+    while(1)
+    {
+        #ifdef SCD30
+        int rdy = readySCD30();
+        setSCDparam();
+        string readco2 = readSCDco2();
+        string readtemp = readSCDtemp();
+        string readhum = readSCDhum();
+        if (rdy != 1) pc.printf("SCD30 not connected\r\n");
+        pc.printf("count: %d   CO2: %s ppm    Temp: %s C    Hum: %s % \r\n", count, readco2, readtemp, readhum);
+        #endif
+        wait(5);
+        count++;
+    }
+}