CPS-Lab* / Mbed 2 deprecated lab6

Dependencies:   ADXL362 mbed MPL3115A2

Files at this revision

API Documentation at this revision

Comitter:
htdoughe
Date:
Tue Mar 06 15:20:39 2018 +0000
Parent:
26:19823b051994
Child:
28:0ed68c73dd28
Commit message:
ctlreg1 set

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Mar 02 18:06:12 2018 +0000
+++ b/main.cpp	Tue Mar 06 15:20:39 2018 +0000
@@ -329,6 +329,10 @@
     double data[900];
 
     int ind = 0;
+    
+    //set sample_time
+    uint8_t st = 0;
+    pressure.setCTRL_REG1(st) ;
 
 
     //GPIO pin indicates sampling should begin -- if voltage == 3.3, start
@@ -342,7 +346,7 @@
                 printf("getting pressure and temp\r\n");
                 data[ind++] = pressure.getPressure();
                 data[ind++] = pressure.getTemperature();
-                wait_ms(1);
+                wait_ms(100);
             }//for
             led3 = 0;
             for(int i = 0; i < 10; i++) {
@@ -351,7 +355,7 @@
                 printf("pressure and temp 2.0\r\n");
                 data[ind++] = pressure.getPressure();
                 data[ind++] = pressure.getTemperature();
-                wait_ms(1);
+                wait_ms(100);
             }//for
     }