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: PinDetect Ulrasonic mbed-rtos mbed WTV020SD_Sound_Breakout_Library
Fork of MC by
Diff: main.cpp
- Revision:
- 10:17a16ceb376b
- Parent:
- 9:1636083fce43
- Child:
- 11:ef54754100ea
diff -r 1636083fce43 -r 17a16ceb376b main.cpp
--- a/main.cpp Tue Apr 26 12:05:57 2016 +0000
+++ b/main.cpp Tue Apr 26 13:10:22 2016 +0000
@@ -10,11 +10,12 @@
DigitalOut IN3(A2);
DigitalOut IN4(A3);
//Second engine 5-8
-/*
+
DigitalOut IN5(D3);
DigitalOut IN6(D4);
DigitalOut IN7(D5);
-DigitalOut IN8(D6);
+DigitalOut IN8(D6)
+/*
//Third engine 9-12
DigitalOut IN9(D8);
DigitalOut IN10(D9);
@@ -53,7 +54,7 @@
IN12=1;
wait_us(fart);
}
-
+*/
void step4Right2()
{
@@ -82,7 +83,7 @@
IN8=1;
wait_us(fart);
}
-*/
+
void step4Right1()
{
//engine 1
@@ -145,7 +146,7 @@
}
-
+*/
void step4Left2()
{
//engine 2
@@ -178,7 +179,7 @@
wait_us(fart);
}
-*/
+
void step4Left1()
{
//engine 1
@@ -298,16 +299,23 @@
}
else if (m_cmd == 'k')
{
- int steps = 50;
+ int steps1 = 50;
+ int steps2 = 50;
//Steps = 242 gives a 60' rotation to the left.
- while (steps >= 0)
+ while (steps1 >= 0)
{
step4Left1();
//step4Left2();
//step4Left3();
- steps--;
+ steps1--;
+ }
+ while (steps2 >= 0)
+ {
+ step4Left2();
+
+ steps2--;
}
m_cmd = 'x';
}
