Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ADXL362 mbed MPL3115A2
Revision 27:a4d5c85a55e1, committed 2018-03-06
- 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
}