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 11:ef54754100ea, committed 2016-04-26
- Comitter:
- mjhaugsdal
- Date:
- Tue Apr 26 13:28:52 2016 +0000
- Parent:
- 10:17a16ceb376b
- Child:
- 12:de8381ca371d
- Commit message:
- Put each engine in threads
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:10:22 2016 +0000
+++ b/main.cpp Tue Apr 26 13:28:52 2016 +0000
@@ -14,7 +14,7 @@
DigitalOut IN5(D3);
DigitalOut IN6(D4);
DigitalOut IN7(D5);
-DigitalOut IN8(D6)
+DigitalOut IN8(D6);
/*
//Third engine 9-12
DigitalOut IN9(D8);
@@ -212,6 +212,17 @@
wait_us(fart);
}
+void motor2(void const *args)
+{
+ while(true)
+ {
+ if(m_cmd == 't')
+ {
+ step4Left2();
+ }
+ }
+}
+
void input(void const *args)
{
@@ -232,6 +243,7 @@
{
//Thread 1 has constant feed from usb
Thread t1(input);
+ Thread t2(motor2);
static char global_direction;
printf("Started");
