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: Movement mbed tunes motor pwm_tone clickers Ultra
Diff: main.cpp
- Revision:
- 5:a0090b8b327b
- Parent:
- 4:8249fab4d8d3
- Child:
- 7:48bf77d076fc
--- a/main.cpp Fri Feb 01 16:29:52 2019 +0000
+++ b/main.cpp Mon Feb 10 10:54:49 2020 +0000
@@ -17,7 +17,7 @@
#include "mbed.h"
#include "motor.h"
#include "tunes.h"
-
+#include "clickers.h"
#define TIME_PERIOD 2 //Constant compiler Values here 2 equates to 2ms or 500Hz base Frequency
#define DUTY 0.9 //DUTY of 1.0=100%, 0.4=40% etc.,
@@ -65,23 +65,11 @@
//Test Microswitches with two different tones see tunes.cpp tunes.h or flash (led1 and led2) onboard LEDs
}
-
+ Wheel.Period_in_ms(2);//Set frequency of the PWMs 500Hz
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:-
-
-// Single line
-
-/*
-multiple
-lines
-*/
-
-
-
-
-// and HERE! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Wheel.Speed(0.8,0.8);//Forward 80%
+ RevStop();
} // go back to start of while loop
} //end of int main()