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.
Diff: main.cpp
- Revision:
- 1:558ab0afbbc5
- Parent:
- 0:852fb667f2d6
- Child:
- 2:5ee1cbcf8e04
--- a/main.cpp Tue Dec 01 14:28:25 2020 +0000 +++ b/main.cpp Tue Dec 01 14:50:50 2020 +0000 @@ -74,11 +74,30 @@ log_ticker.attach(&log_data,0.5); wait(1); while(1) - { - // put your main control code here + { + p_sensor.Barometer_MS5837(); + + printf("Pressure: "); + printf("%f",p_sensor.MS5837_Pressure()); + printf(" mbar"); + + printf("Temperature: "); + printf("%f",p_sensor.MS5837_Temperature()); + printf(" deg C "); + + printf("Depth: "); + printf("%f",p_sensor.depth()); + printf(" m "); + + printf("Altitude: "); + printf("%f",p_sensor.altitude()); + printf(" m above mean sea level\r\n"); + + myled=!myled; + wait(1); } -} + } //-------------Customized functions---------------------------------------------//---------------------------------------- ///-----------Welcome menu---------------------///