ddd

Dependencies:   mbed TCS3472_I2C DHT

Files at this revision

API Documentation at this revision

Comitter:
youdllo5
Date:
Tue Oct 15 06:51:33 2019 +0000
Commit message:
first commit;

Changed in this revision

DHT.lib Show annotated file Show diff for this revision Revisions of this file
TCS3472_I2C.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.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DHT.lib	Tue Oct 15 06:51:33 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/Wimpie/code/DHT/#9b5b3200688f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TCS3472_I2C.lib	Tue Oct 15 06:51:33 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/karlmaxwell67/code/TCS3472_I2C/#6d5bb4ad7d6e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Oct 15 06:51:33 2019 +0000
@@ -0,0 +1,38 @@
+#include "mbed.h"
+
+#include "DHT.h"
+
+#include "TCS3472_I2C.h"
+
+//DigitalOut led(LED3);
+Serial pc(USBTX, USBRX);
+
+DHT dht(A1, 22);
+
+TCS3472_I2C rgb_sensor( PB_4, PA_7 );
+
+int main(){
+    
+    int data;
+    rgb_sensor.enablePowerAndRGBC();
+    rgb_sensor.setIntegrationTime(100);
+    int rgb_readings[4];
+    
+    
+    while(1){
+        
+        data = dht.readData();
+        rgb_sensor.getAllColors(rgb_readings);
+        //led = !led;
+        if(data == ERROR_NONE){
+            pc.printf("La temperature de la salle est: %.2f et Humidite est: %.2f\n", dht.ReadTemperature(CELCIUS), dht.ReadHumidity());
+        }
+        else{
+            //pc.printf("Erreur numero: %d\n", data);
+        }
+        
+        pc.printf( "red: %d, green: %d, blue: %d, clear: %d\n", rgb_readings[0], rgb_readings[1], rgb_readings[2], rgb_readings[3] );
+        wait_ms(5000);
+        
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Oct 15 06:51:33 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file