Chawisorn samrit
/
M89_FULL_CODE
green
main.cpp@0:f4444dfcd74c, 2019-04-22 (annotated)
- Committer:
- moove1334
- Date:
- Mon Apr 22 02:30:12 2019 +0000
- Revision:
- 0:f4444dfcd74c
- Child:
- 1:f72ac77b34f3
to use Jenny's library
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
moove1334 | 0:f4444dfcd74c | 1 | #include "mbed.h" |
moove1334 | 0:f4444dfcd74c | 2 | #include "AX12.h" |
moove1334 | 0:f4444dfcd74c | 3 | |
moove1334 | 0:f4444dfcd74c | 4 | Serial pc(D1,D0); |
moove1334 | 0:f4444dfcd74c | 5 | AX12 ax12(PA_9,PA_10,0x01,1000000); |
moove1334 | 0:f4444dfcd74c | 6 | |
moove1334 | 0:f4444dfcd74c | 7 | DigitalOut TxEn (D4); |
moove1334 | 0:f4444dfcd74c | 8 | |
moove1334 | 0:f4444dfcd74c | 9 | int main() { |
moove1334 | 0:f4444dfcd74c | 10 | TxEn = 1; |
moove1334 | 0:f4444dfcd74c | 11 | ax12.SetCRSpeed(0.1); |
moove1334 | 0:f4444dfcd74c | 12 | ax12.SetGoal(200, 1); |
moove1334 | 0:f4444dfcd74c | 13 | |
moove1334 | 0:f4444dfcd74c | 14 | } |