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@4:4329f61a927e, 2019-01-21 (annotated)
- Committer:
- robot_ligne
- Date:
- Mon Jan 21 17:18:27 2019 +0000
- Revision:
- 4:4329f61a927e
- Parent:
- 3:5c32522fbe3f
- Child:
- 5:5d767f9355e2
version 21/01/19; probleme compilation liaison serie
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
CharlesBl | 0:d0a183ba50d5 | 1 | #include "mbed.h" |
robot_ligne | 4:4329f61a927e | 2 | #include "init.h" |
robot_ligne | 4:4329f61a927e | 3 | #include "moteur.h" |
CharlesBl | 0:d0a183ba50d5 | 4 | |
robot_ligne | 4:4329f61a927e | 5 | volatile uint8_t command_tab [256][2]; |
robot_ligne | 4:4329f61a927e | 6 | |
robot_ligne | 4:4329f61a927e | 7 | |
CharlesBl | 3:5c32522fbe3f | 8 | |
CharlesBl | 3:5c32522fbe3f | 9 | DigitalOut led1(LED1); |
CharlesBl | 0:d0a183ba50d5 | 10 | |
CharlesBl | 3:5c32522fbe3f | 11 | int main(){ |
CharlesBl | 3:5c32522fbe3f | 12 | led1=0; |
CharlesBl | 3:5c32522fbe3f | 13 | |
CharlesBl | 3:5c32522fbe3f | 14 | while(1){ |
robot_ligne | 4:4329f61a927e | 15 | command(drive_forward_M1 ,5); |
robot_ligne | 4:4329f61a927e | 16 | wait_ms(100); |
robot_ligne | 4:4329f61a927e | 17 | |
robot_ligne | 4:4329f61a927e | 18 | /* |
CharlesBl | 3:5c32522fbe3f | 19 | for(i=0; i<15; i++) { |
robot_ligne | 4:4329f61a927e | 20 | command(tab_command[drive_forward_M1] ,i); |
CharlesBl | 3:5c32522fbe3f | 21 | wait_ms(100); |
CharlesBl | 3:5c32522fbe3f | 22 | } |
CharlesBl | 3:5c32522fbe3f | 23 | for(i=15; i>0; i--) { |
robot_ligne | 4:4329f61a927e | 24 | command(tab_command[drive_forward_M1] ,i); |
CharlesBl | 3:5c32522fbe3f | 25 | wait_ms(100); |
CharlesBl | 3:5c32522fbe3f | 26 | } |
CharlesBl | 3:5c32522fbe3f | 27 | |
CharlesBl | 3:5c32522fbe3f | 28 | for(i=0; i<15; i++) { |
robot_ligne | 4:4329f61a927e | 29 | command(tab_command[] ,i); |
CharlesBl | 3:5c32522fbe3f | 30 | wait_ms(100); |
CharlesBl | 3:5c32522fbe3f | 31 | } |
CharlesBl | 3:5c32522fbe3f | 32 | for(i=15; i>0; i--) { |
robot_ligne | 4:4329f61a927e | 33 | command(tab_command[] ,i); |
CharlesBl | 3:5c32522fbe3f | 34 | wait_ms(100); |
CharlesBl | 3:5c32522fbe3f | 35 | } |
robot_ligne | 4:4329f61a927e | 36 | */ |
CharlesBl | 0:d0a183ba50d5 | 37 | } |
robot_ligne | 4:4329f61a927e | 38 | |
CharlesBl | 0:d0a183ba50d5 | 39 | } |
CharlesBl | 3:5c32522fbe3f | 40 | |
CharlesBl | 3:5c32522fbe3f | 41 | |
CharlesBl | 3:5c32522fbe3f | 42 |