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:
- 14:ed172dec4022
- Parent:
- 10:b2fe6d1dee81
- Child:
- 15:09aa3c2684b2
--- a/main.cpp Thu Dec 02 14:29:55 2021 +0000 +++ b/main.cpp Thu Dec 02 14:44:42 2021 +0000 @@ -50,7 +50,7 @@ //Control Parameters float tim =5; //define thruster on time -float percent = 1.2; //user defined percent of thrust power +float percent = 1.5; //user defined percent of thrust power //Control related functions void thrust_on(float pw, float on_time); //input is pulse width @@ -86,12 +86,17 @@ log_ticker.attach(&log_data,0.5); wait(1); + int count=0; while(1) { + count=count+1; float pw= percent; float on_time =tim; thrust_on(pw, on_time); //turn thruster on for 5 seconds - return 0; + wait(10); + if count==3{ + return 0; + } } }