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.
Dependencies: mbed
main.cpp@6:e20ec9f212ea, 2019-02-14 (annotated)
- Committer:
- CharlesBl
- Date:
- Thu Feb 14 14:16:10 2019 +0000
- Revision:
- 6:e20ec9f212ea
- Parent:
- 5:5d767f9355e2
- Child:
- 7:a59d1efdbfe1
ajout fonctions mcp
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
CharlesBl | 0:d0a183ba50d5 | 1 | #include "mbed.h" |
CharlesBl | 6:e20ec9f212ea | 2 | #include "Controler.h" |
CharlesBl | 0:d0a183ba50d5 | 3 | |
CharlesBl | 6:e20ec9f212ea | 4 | |
CharlesBl | 6:e20ec9f212ea | 5 | Controler mcp; |
CharlesBl | 0:d0a183ba50d5 | 6 | |
CharlesBl | 6:e20ec9f212ea | 7 | int main(){ |
CharlesBl | 6:e20ec9f212ea | 8 | for(int i=0; i<15; i++) { |
CharlesBl | 6:e20ec9f212ea | 9 | mcp.drive_forward(i); |
CharlesBl | 6:e20ec9f212ea | 10 | wait_ms(100); |
CharlesBl | 6:e20ec9f212ea | 11 | } |
CharlesBl | 6:e20ec9f212ea | 12 | for(int i=15; i>0; i--) { |
CharlesBl | 6:e20ec9f212ea | 13 | mcp.drive_forward(i); |
CharlesBl | 6:e20ec9f212ea | 14 | wait_ms(100); |
CharlesBl | 6:e20ec9f212ea | 15 | } |
CharlesBl | 6:e20ec9f212ea | 16 | for(int i=0; i<15; i++) { |
CharlesBl | 6:e20ec9f212ea | 17 | mcp.drive_backwards(i); |
CharlesBl | 6:e20ec9f212ea | 18 | wait_ms(100); |
CharlesBl | 6:e20ec9f212ea | 19 | } |
CharlesBl | 6:e20ec9f212ea | 20 | for(int i=15; i>0; i--) { |
CharlesBl | 6:e20ec9f212ea | 21 | mcp.drive_backwards(i); |
CharlesBl | 6:e20ec9f212ea | 22 | wait_ms(100); |
CharlesBl | 0:d0a183ba50d5 | 23 | } |
CharlesBl | 0:d0a183ba50d5 | 24 | } |
CharlesBl | 3:5c32522fbe3f | 25 | |
CharlesBl | 3:5c32522fbe3f | 26 | |
CharlesBl | 3:5c32522fbe3f | 27 |