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
- Committer:
- CharlesBl
- Date:
- 2019-01-24
- Revision:
- 5:5d767f9355e2
- Parent:
- 4:4329f61a927e
- Child:
- 6:e20ec9f212ea
File content as of revision 5:5d767f9355e2:
#include "mbed.h"
#include "defines.h"
#include "moteur.h"
UARTSerial controlleur(D10,D2,115200);
Serial pc(SERIAL_TX, SERIAL_RX);
int main(){
while(1){
for(int i=0; i<15; i++) {
command(drive_forward_M1 ,i);
command(drive_forward_M2 ,i);
wait_ms(100);
}
for(int i=15; i>0; i--) {
command(drive_forward_M1 ,i);
command(drive_forward_M2 ,i);
wait_ms(100);
}
for(int i=0; i<15; i++) {
command(drive_backwards_M1 ,i);
command(drive_backwards_M2 ,i);
wait_ms(100);
}
for(int i=15; i>0; i--) {
command(drive_backwards_M1 ,i);
command(drive_backwards_M2 ,i);
wait_ms(100);
}
}
}