Ver1.01

Dependencies:   BMP085 SDFileSystem mbed

Files at this revision

API Documentation at this revision

Comitter:
emanon
Date:
Mon Jul 14 09:20:00 2014 +0000
Parent:
0:e4ca6571a751
Commit message:
1st test

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r e4ca6571a751 -r 31e810237ac1 main.cpp
--- a/main.cpp	Fri Jul 11 21:36:20 2014 +0000
+++ b/main.cpp	Mon Jul 14 09:20:00 2014 +0000
@@ -11,6 +11,11 @@
 
 Serial pc(USBTX, USBRX);
 
+AnalogIn ain_CDS(p15);
+AnalogIn ain_Humedity(p16);
+AnalogIn ain_LM35DZ(p20);
+
+
 DigitalOut myled(LED1);
 
 int fileio() {
@@ -70,16 +75,30 @@
     myled = 0;
     
     while (1) { 
-         wait(0.1);
-         
+        wait(1.5);
+        
+        //BOSH BMP085 Barometric pressure,temperature measurement
         accelerometer.getOutput(readings);
-        pc.printf("%+4.2f, %+4.2f, %+4.2f\n",
+        pc.printf("\nBOSH BMP085 --------------------\n");
+        pc.printf("  %+4.2f, %+4.2f, %+4.2f\n",
             (float((int16_t)readings[0]+18)/256), 
             (float((int16_t)readings[1]-4 )/256), 
             (float((int16_t)readings[2]+22)/256));
         
         bmp085.update();
-        pc.printf("p:%6.2f hPa / t:%6.2f C\n", bmp085.get_pressure(), bmp085.get_temperature());
-        wait(2);
+        
+        //ADXL 345 Acceleration measurement
+        pc.printf("ADXL345 ------------------------\n");
+        pc.printf("  p:%6.2f hPa / t:%6.2f C\n", bmp085.get_pressure(), bmp085.get_temperature());
+        
+        //CSDS Ambient light measurement P15 analog-in1
+        pc.printf("Ambient light :: %f\n",ain_CDS*100);
+        
+        //Humidity measurement P16 analog-in2
+        pc.printf("Humidity       :: %f\n",ain_Humedity*100);
+        
+        //LM35DZ Temperature measurement P20 analog-in6
+        pc.printf("Temperature    :: %f\n",ain_LM35DZ*100);
+        
     }
 }
\ No newline at end of file