Code for a Portable Weather Station built on a PCB.
Dependencies: BMP180 N5110 PowerControl mbed
Revision 14:054e6faf0ca8, committed 2015-05-06
- Comitter:
- Volcano_498
- Date:
- Wed May 06 15:58:08 2015 +0000
- Parent:
- 13:560d1f39fdc7
- Commit message:
- Revision 1.0.1 . Comments for semihost_powerdown and the block of code commented due to the fact that the function also prevents Flash Memory from being overwritten.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 560d1f39fdc7 -r 054e6faf0ca8 main.cpp --- a/main.cpp Mon May 04 02:47:20 2015 +0000 +++ b/main.cpp Wed May 06 15:58:08 2015 +0000 @@ -14,7 +14,7 @@ @brief -- Adjusting the unit the pressure is displayed in: millibars(mb), Pascals(Pa) and Atmospheres (atm). @brief -- Displaying a brief splash screen to show changes in the unit display settings. @author Volkan Esendag (SID:200795870) -@date 11 March 2015 (created) / 4 May 2015(last modified) +@date 11 March 2015 (created) / 6 May 2015(last modified) */ @@ -323,6 +323,7 @@ } //...to power down the USB interface when the USB cable is detached. + LocalFileSystem local("local"); // create local filesystem /** @@ -777,10 +778,13 @@ bmp180.init(); PHY_PowerDown(); //powers down the Ethernet feature. - + + /* int result = semihost_powerdown(); //as a result, power down the USB connection //unless the cable is connected. - + //but this also prevents the flash memory from being overwritten when the cable is disconnected. + //so one should uncomment this block of code only if the device is to be used with the cable attached. + */ Measurement measurement; // object created for pressure & temperature using the structure declared in BMP180 class while(1) {