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.
Diff: main.cpp
- Revision:
- 2:1117ce9d1867
- Parent:
- 1:822c609fb2ce
--- a/main.cpp Fri Apr 05 12:12:24 2019 +0000
+++ b/main.cpp Wed Apr 10 09:33:36 2019 +0000
@@ -3,18 +3,23 @@
#include "Daan_Test1_maxon.h"
RawSerial pc(SERIAL_TX,SERIAL_RX);
-CAN can(PB_5,PB_6); //NOG CHECKEN!!!
+CAN can(PB_8,PB_9); //NOG CHECKEN!!!
-EPOS epos;
-Thread thread;
+EPOS epos(1);
+Thread thread1;
+Thread thread2;
int main() {
pc.baud(921600);
can.frequency(250000); //NOG AANPASSEN IN EPOS COMPUTER PROGRAMMA ZODAT DE CAN FREQUENCY OP MOTORCONTROLLER OVEREENKOMT MET DIE VAN DE MASTER!! -> value 3
pc.printf("startup: \r\n");
+
+ thread1.start(&epos,&EPOS::Homing); //start de functie Homing
+ Thread::wait(100);
+ thread1.join();
- thread.start(&epos,&EPOS::Homing); //start de functie Homing
+ thread2.start(&epos,&EPOS::StartPositionMode);
Thread::wait(100);
-
+ thread2.join();
}
\ No newline at end of file