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 21:9f3ae352ee63, committed 2016-05-03
- Comitter:
- mjhaugsdal
- Date:
- Tue May 03 13:25:25 2016 +0000
- Parent:
- 20:d90bd1718078
- Child:
- 22:f6e328f7bd28
- Commit message:
- Put in some comments.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue May 03 12:34:20 2016 +0000
+++ b/main.cpp Tue May 03 13:25:25 2016 +0000
@@ -25,7 +25,7 @@
static char m_cmd = 'x';
-
+//Methods to set pins to control direction.
void stepAllRight()
{
//engine 1
@@ -311,6 +311,7 @@
wait_us(fart);
}
+//Method to release all engines.
void stopAll()
{
IN1=0;
@@ -327,6 +328,7 @@
IN12=0;
}
+//Methods to release single engines.
void stopE1()
{
IN1=0;
@@ -413,16 +415,19 @@
m_cmd = 'x';
}*/
+
+ //Release all motors / Set all pins to 0
if (m_cmd == 'z')
{
stopAll();
}
-
+ //Make all engines halt and hold still.
if (m_cmd == 'x')
{
Thread::wait(5);
}
+ //Controlling each motor seperately.
//ENGINE 1
if(m_cmd == '7')
{
