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:
- 5:756dc04a891c
- Parent:
- 4:8249fab4d8d3
- Child:
- 6:eac1e6a55274
--- a/main.cpp Fri Feb 01 16:29:52 2019 +0000
+++ b/main.cpp Fri Feb 14 14:34:04 2020 +0000
@@ -66,24 +66,27 @@
}
- while(true) //Repeat the following forever NB always true!
- {
-// YOUR LINES OF CODE for your stratagy go between HERE! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// Remember to use plenty of comments by using:-
+ //Repeat the following forever NB always true!
-// Single line
-
-/*
-multiple
-lines
-*/
-
+// YOUR LINES OF CODE for your stratagy go between HERE! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Wheel.Period_in_ms(2);//Set frequency of the PWMs 500Hz
+ while(true)
+ {
+ Wheel.Speed(0.8,0.8);//Forward 80%
+ wait(5.0);
+ Wheel.Stop();
+ wait(1.0);
+ Wheel.Speed(-0.8,-0.8);//Reverse 80%
+ wait(5.0);
+ Wheel.Stop();
+ wait(1.0);
+ }
// and HERE! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
} // go back to start of while loop
-} //end of int main()
+ //end of int main()