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:
- 4:d87b1e40d419
- Parent:
- 3:22a86bc49f44
- Child:
- 5:17f2b3e61112
diff -r 22a86bc49f44 -r d87b1e40d419 main.cpp --- a/main.cpp Tue Nov 30 14:35:56 2021 +0000 +++ b/main.cpp Tue Nov 30 14:53:07 2021 +0000 @@ -44,6 +44,7 @@ //functions void welcome(); void log_data(); + //IMU related void accel_update(); //update accelerometer related variables. we use imu_ticker to call this function //Control related functions @@ -56,9 +57,11 @@ //inital set the thruster esc to 1ms duty cycle thruster.period(0.002); // 2 ms period thruster.pulsewidth(1.0/1000.000); + //Initialize accelerometer: accel.init(); led1=1; + //initialize pressure sensor pc.printf("setting the pressure sensor\r\n"); p_sensor.MS5837Reset(); @@ -67,6 +70,7 @@ t.start(); led2=1; welcome(); + //-----setup ticker-------// //setup ticker to separate log and IMU data update. //so we could have all our control code in the while loop