Bayley Wang
/
dc_motor_control
bad dc motor controller with current mode
CommandProcessor/cmd_sys.cpp@0:2b1edabdd26b, 2019-02-03 (annotated)
- Committer:
- bwang
- Date:
- Sun Feb 03 03:38:05 2019 +0000
- Revision:
- 0:2b1edabdd26b
first commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bwang | 0:2b1edabdd26b | 1 | #include "mbed.h" |
bwang | 0:2b1edabdd26b | 2 | #include "CommandProcessor.h" |
bwang | 0:2b1edabdd26b | 3 | |
bwang | 0:2b1edabdd26b | 4 | void cmd_clear(Serial *pc) { |
bwang | 0:2b1edabdd26b | 5 | pc->printf("\e[1;1H\e[2J"); |
bwang | 0:2b1edabdd26b | 6 | } |
bwang | 0:2b1edabdd26b | 7 | |
bwang | 0:2b1edabdd26b | 8 | void cmd_help(Serial *pc) { |
bwang | 0:2b1edabdd26b | 9 | pc->printf("%s\n", "setp <float>: set a duty cycle between 0.0 and 1.0"); |
bwang | 0:2b1edabdd26b | 10 | pc->printf("%s\n", "freq <float>: set a frequency between 500.0Hz and 10000.0Hz"); |
bwang | 0:2b1edabdd26b | 11 | } |