Danielle Kruijver / Mbed 2 deprecated Daan_Test1_maxon

Dependencies:   mbed mbed-rtos

main.cpp

Committer:
DanielleKruijver
Date:
2019-04-10
Revision:
2:1117ce9d1867
Parent:
1:822c609fb2ce

File content as of revision 2:1117ce9d1867:

#include "mbed.h"
#include "rtos.h"
#include "Daan_Test1_maxon.h"

RawSerial pc(SERIAL_TX,SERIAL_RX);
CAN can(PB_8,PB_9);                                                             //NOG CHECKEN!!!

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();
    
    thread2.start(&epos,&EPOS::StartPositionMode);                                         
    Thread::wait(100); 
    thread2.join();
    
}