Danielle Kruijver / Mbed 2 deprecated Daan_Test1_maxon

Dependencies:   mbed mbed-rtos

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