![](/media/cache/profiles/f0fcf351df4eb6786e9bb6fc4e2dee02.jpg.50x50_q85.jpg)
DRV8830/TI Motor Driver sample program.\\ This program can control two motors.
main.cpp@1:e9d1c42a73ae, 2014-02-28 (annotated)
- Committer:
- bcostm
- Date:
- Fri Feb 28 06:52:34 2014 +0000
- Revision:
- 1:e9d1c42a73ae
- Parent:
- 0:028fac66239d
- Child:
- 2:e0b9fd6126d1
Add note for hyperterminal configuration.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bcostm | 0:028fac66239d | 1 | #include "mbed.h" |
bcostm | 1:e9d1c42a73ae | 2 | |
bcostm | 1:e9d1c42a73ae | 3 | //------------------------------------ |
bcostm | 1:e9d1c42a73ae | 4 | // Hyperterminal configuration |
bcostm | 1:e9d1c42a73ae | 5 | // 9600 bauds, 8-bit data, no parity |
bcostm | 1:e9d1c42a73ae | 6 | //------------------------------------ |
bcostm | 1:e9d1c42a73ae | 7 | |
bcostm | 0:028fac66239d | 8 | Serial pc(SERIAL_TX, SERIAL_RX); |
bcostm | 0:028fac66239d | 9 | |
bcostm | 0:028fac66239d | 10 | DigitalOut myled(LED1); |
bcostm | 0:028fac66239d | 11 | |
bcostm | 0:028fac66239d | 12 | int main() { |
bcostm | 0:028fac66239d | 13 | int i = 1; |
bcostm | 0:028fac66239d | 14 | pc.printf("Hello World !\n"); |
bcostm | 0:028fac66239d | 15 | while(1) { |
bcostm | 0:028fac66239d | 16 | wait(1); |
bcostm | 0:028fac66239d | 17 | pc.printf("This program runs since %d seconds.\n", i++); |
bcostm | 0:028fac66239d | 18 | myled = !myled; |
bcostm | 0:028fac66239d | 19 | } |
bcostm | 0:028fac66239d | 20 | } |
bcostm | 0:028fac66239d | 21 |