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: mbed MMA8452Q MS5837 SDFileSystem SCI_SENSOR
Diff: main.cpp
- Revision:
- 32:ffe14e791fa9
- Parent:
- 31:f62d09120c6a
- Child:
- 33:b9e349e91d29
--- a/main.cpp Wed Dec 08 20:57:53 2021 +0000 +++ b/main.cpp Wed Dec 08 21:16:40 2021 +0000 @@ -100,7 +100,7 @@ log_ticker.attach(&log_data,0.5); led2=0; led1=0; - thrust_on(1.2,2); //Runs the thrusters at 20% for 2 seconds, just to test them. + //thrust_on(1.2,2); //Runs the thrusters at 20% for 2 seconds, just to test them. while(1){ //Part One @@ -205,8 +205,11 @@ //end of code from Licht fp = fopen(fname, "a"); - fprintf(fp, "$DATA, Time:%f, Pressure:%f, Depth:%f, Acceleration:%f, %f, %f, Temp:%f, Light:%f, Percent:%f\r\n", t.read(),p_sensor.MS5837_Pressure(),p_sensor.depth(),accelData[0],accelData[1],accelData[2],temp.temp(),light.light(),percent); + fprintf(fp, "$DATA \r\n"); + fprintf(fp, "Time:%f \r\n", t.read()); + // Time:%f, Pressure:%f, Depth:%f, Acceleration:%f, %f, %f, Temp:%f, Light:%f, Percent:%f\r\n", t.read(),p_sensor.MS5837_Pressure(),p_sensor.depth(),accelData[0],accelData[1],accelData[2],temp.temp(),light.light(),percent); fclose(fp); + } ///-----------acceleromter related functions---------------------///