test
Dependencies: MX28 iSerial mbed
Fork of MX_control by
classproject.cpp@0:c98ac0a05620, 2014-10-23 (annotated)
- Committer:
- soulx
- Date:
- Thu Oct 23 07:34:07 2014 +0000
- Revision:
- 0:c98ac0a05620
- Child:
- 1:0a652990dab1
test motor
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
soulx | 0:c98ac0a05620 | 1 | #include "mbed.h" |
soulx | 0:c98ac0a05620 | 2 | #include "MX28.h" |
soulx | 0:c98ac0a05620 | 3 | |
soulx | 0:c98ac0a05620 | 4 | #define ID_ROLL 1 |
soulx | 0:c98ac0a05620 | 5 | #define ID_PITCH 2 |
soulx | 0:c98ac0a05620 | 6 | |
soulx | 0:c98ac0a05620 | 7 | #define CENTER_ROLL 2048 |
soulx | 0:c98ac0a05620 | 8 | #define CENTER_ |
soulx | 0:c98ac0a05620 | 9 | |
soulx | 0:c98ac0a05620 | 10 | Serial pc(USBTX, USBRX); |
soulx | 0:c98ac0a05620 | 11 | MX28 mx28(PA_11, PA_12, 1000000); |
soulx | 0:c98ac0a05620 | 12 | |
soulx | 0:c98ac0a05620 | 13 | int main() |
soulx | 0:c98ac0a05620 | 14 | { |
soulx | 0:c98ac0a05620 | 15 | pc.baud(115200); |
soulx | 0:c98ac0a05620 | 16 | pc.printf("======================================================\r\n"); |
soulx | 0:c98ac0a05620 | 17 | |
soulx | 0:c98ac0a05620 | 18 | |
soulx | 0:c98ac0a05620 | 19 | return 0; |
soulx | 0:c98ac0a05620 | 20 | } |