test description

Dependencies:   C12832 Sht31 vl53l0x_api

Fork of mbed-cloud-connect-sensor-laser-distance by Andrea Corrado

Files at this revision

API Documentation at this revision

Comitter:
andcor02
Date:
Wed Nov 01 13:20:56 2017 +0000
Child:
1:76a5fa924120
Commit message:
/* Sets up LCD and prints sensor data value of Indoor Air Quality sensor CCS811 to LCD */

Changed in this revision

C12832.lib Show annotated file Show diff for this revision Revisions of this file
CCS811.lib Show annotated file Show diff for this revision Revisions of this file
Sht31.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/C12832.lib	Wed Nov 01 13:20:56 2017 +0000
@@ -0,0 +1,1 @@
+https://mbed.org/users/chris/code/C12832/#7de323fa46fe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CCS811.lib	Wed Nov 01 13:20:56 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/andcor02/code/CCS811/#64a96d555ef0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sht31.lib	Wed Nov 01 13:20:56 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/andcor02/code/Sht31/#c84a60326ecf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Nov 01 13:20:56 2017 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "C12832.h"
+#include "CCS811.h"
+
+/* Sets up LCD and prints sensor data value of Indoor Air Quality sensor to LCD */
+
+C12832 lcd(PE_14, PE_12, PD_12, PD_11, PE_9); //LCD: MOSI, SCK, RESET, A0, nCS
+CCS811 ccs811(PF_0, PF_1); //IAQ SENSOR: I2C_SDA, I2C_SCL
+
+int main()
+{
+    ccs811.init();
+    
+    while(1) {
+        uint16_t eco2, tvoc;
+        ccs811.readData(&eco2, &tvoc);
+        
+        lcd.locate(0,3);
+        lcd.printf("[AIR QUAL]");
+        lcd.locate(0,15);
+        lcd.printf("eCO2:%dppm, TVO:%dppb", eco2, tvoc); // Print to LCD values
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Wed Nov 01 13:20:56 2017 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#98ba8acb83cfc65f30a8a0771a27c71443ab093a