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-rtos mbed PinDetect
Fork of FinalMotorControl by
Revision 12:de8381ca371d, committed 2016-04-26
- Comitter:
- mjhaugsdal
- Date:
- Tue Apr 26 13:39:14 2016 +0000
- Parent:
- 11:ef54754100ea
- Child:
- 13:9aa772ae6057
- Commit message:
- Added void methods to each thread
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Apr 26 13:28:52 2016 +0000
+++ b/main.cpp Tue Apr 26 13:39:14 2016 +0000
@@ -55,34 +55,7 @@
wait_us(fart);
}
*/
-void step4Right2()
-{
- //engine 2
- IN5=0;
- IN6=1;
- IN7=0;
- IN8=1;
- wait_us(fart);
- //engine 2
- IN5=0;
- IN6=1;
- IN7=1;
- IN8=0;
- wait_us(fart);
- //engine 2
- IN5=1;
- IN6=0;
- IN7=1;
- IN8=0;
- wait_us(fart);
- //engine 2
- IN5=1;
- IN6=0;
- IN7=0;
- IN8=1;
- wait_us(fart);
-}
void step4Right1()
{
@@ -147,38 +120,7 @@
}
*/
-void step4Left2()
-{
- //engine 2
- IN5=1;
- IN6=0;
- IN7=0;
- IN8=1;
- wait_us(fart);
-
- //engine 2
- IN5=1;
- IN6=0;
- IN7=1;
- IN8=0;
- wait_us(fart);
-
- //engine 2
- IN5=0;
- IN6=1;
- IN7=1;
- IN8=0;
- wait_us(fart);
-
- //engine 2
- IN5=0;
- IN6=1;
- IN7=0;
- IN8=1;
- wait_us(fart);
-
-}
void step4Left1()
{
@@ -214,6 +156,68 @@
void motor2(void const *args)
{
+ void step4Right2()
+{
+
+ //engine 2
+ IN5=0;
+ IN6=1;
+ IN7=0;
+ IN8=1;
+ wait_us(fart);
+ //engine 2
+ IN5=0;
+ IN6=1;
+ IN7=1;
+ IN8=0;
+ wait_us(fart);
+ //engine 2
+ IN5=1;
+ IN6=0;
+ IN7=1;
+ IN8=0;
+ wait_us(fart);
+ //engine 2
+ IN5=1;
+ IN6=0;
+ IN7=0;
+ IN8=1;
+ wait_us(fart);
+}
+
+void step4Left2()
+{
+ //engine 2
+ IN5=1;
+ IN6=0;
+ IN7=0;
+ IN8=1;
+ wait_us(fart);
+
+
+ //engine 2
+ IN5=1;
+ IN6=0;
+ IN7=1;
+ IN8=0;
+ wait_us(fart);
+
+ //engine 2
+ IN5=0;
+ IN6=1;
+ IN7=1;
+ IN8=0;
+ wait_us(fart);
+
+ //engine 2
+ IN5=0;
+ IN6=1;
+ IN7=0;
+ IN8=1;
+ wait_us(fart);
+
+}
+
while(true)
{
if(m_cmd == 't')
