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.
main.cpp@1:822c609fb2ce, 2019-04-05 (annotated)
- Committer:
- DanielleKruijver
- Date:
- Fri Apr 05 12:12:24 2019 +0000
- Revision:
- 1:822c609fb2ce
- Parent:
- 0:785972ab5892
- Child:
- 2:1117ce9d1867
Test 1 CAN line maxon motor
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| DanielleKruijver | 0:785972ab5892 | 1 | #include "mbed.h" |
| DanielleKruijver | 0:785972ab5892 | 2 | #include "rtos.h" |
| DanielleKruijver | 0:785972ab5892 | 3 | #include "Daan_Test1_maxon.h" |
| DanielleKruijver | 0:785972ab5892 | 4 | |
| DanielleKruijver | 0:785972ab5892 | 5 | RawSerial pc(SERIAL_TX,SERIAL_RX); |
| DanielleKruijver | 0:785972ab5892 | 6 | CAN can(PB_5,PB_6); //NOG CHECKEN!!! |
| DanielleKruijver | 0:785972ab5892 | 7 | |
| DanielleKruijver | 0:785972ab5892 | 8 | EPOS epos; |
| DanielleKruijver | 0:785972ab5892 | 9 | Thread thread; |
| DanielleKruijver | 0:785972ab5892 | 10 | |
| DanielleKruijver | 0:785972ab5892 | 11 | int main() { |
| DanielleKruijver | 0:785972ab5892 | 12 | pc.baud(921600); |
| DanielleKruijver | 0:785972ab5892 | 13 | can.frequency(250000); //NOG AANPASSEN IN EPOS COMPUTER PROGRAMMA ZODAT DE CAN FREQUENCY OP MOTORCONTROLLER OVEREENKOMT MET DIE VAN DE MASTER!! -> value 3 |
| DanielleKruijver | 0:785972ab5892 | 14 | pc.printf("startup: \r\n"); |
| DanielleKruijver | 0:785972ab5892 | 15 | |
| DanielleKruijver | 1:822c609fb2ce | 16 | thread.start(&epos,&EPOS::Homing); //start de functie Homing |
| DanielleKruijver | 1:822c609fb2ce | 17 | Thread::wait(100); |
| DanielleKruijver | 0:785972ab5892 | 18 | |
| DanielleKruijver | 0:785972ab5892 | 19 | |
| DanielleKruijver | 0:785972ab5892 | 20 | } |