AirQualityClick on A0 on Nucleo-F411RE

Dependencies:   Air mbed

Files at this revision

API Documentation at this revision

Comitter:
Guillaume31
Date:
Tue Apr 14 11:37:04 2015 +0000
Commit message:
AirQualityClick on A0 on Nucleo-F411RE

Changed in this revision

Air.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.lib Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 415a45341fd5 Air.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Air.lib	Tue Apr 14 11:37:04 2015 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/Guillaume31/code/Air/#964a928b323e
diff -r 000000000000 -r 415a45341fd5 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Apr 14 11:37:04 2015 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#include "Air.h"
+
+Serial pc(SERIAL_TX, SERIAL_RX); 
+ 
+//AnalogIn atm (A0);
+
+Air atm (A0);
+
+float atmos;
+int temp = 20, hum = 40;
+
+
+int main() {
+  pc.printf("Debut programme \n\r");
+  pc.printf("Temperature = 20 C,    Humidite = 40%% \n\r");
+  
+  while(1) {
+    //atmos = atm.read();
+    atmos = atm.getPPM ();
+    pc.printf("PPM : %.2f \n\r", atmos);
+    
+    atmos = atm.getResistance ();
+    pc.printf("Resistance : %.2f \n\r", atmos);
+    
+    atmos = atm.getPPM ();
+    pc.printf("RZero : %.2f \n\r", atmos);
+
+    wait (1);
+  }
+}
+ 
\ No newline at end of file
diff -r 000000000000 -r 415a45341fd5 mbed.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.lib	Tue Apr 14 11:37:04 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/#487b796308b0