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
Diff: main.cpp
- Revision:
- 5:5d767f9355e2
- Parent:
- 4:4329f61a927e
- Child:
- 6:e20ec9f212ea
--- a/main.cpp Mon Jan 21 17:18:27 2019 +0000
+++ b/main.cpp Thu Jan 24 09:40:10 2019 +0000
@@ -1,41 +1,34 @@
#include "mbed.h"
-#include "init.h"
+#include "defines.h"
#include "moteur.h"
-volatile uint8_t command_tab [256][2];
-
-
-
-DigitalOut led1(LED1);
+UARTSerial controlleur(D10,D2,115200);
+Serial pc(SERIAL_TX, SERIAL_RX);
int main(){
- led1=0;
-
- while(1){
- command(drive_forward_M1 ,5);
- wait_ms(100);
-
-/*
- for(i=0; i<15; i++) {
- command(tab_command[drive_forward_M1] ,i);
+ while(1){
+ for(int i=0; i<15; i++) {
+ command(drive_forward_M1 ,i);
+ command(drive_forward_M2 ,i);
wait_ms(100);
}
- for(i=15; i>0; i--) {
- command(tab_command[drive_forward_M1] ,i);
+ for(int i=15; i>0; i--) {
+ command(drive_forward_M1 ,i);
+ command(drive_forward_M2 ,i);
wait_ms(100);
}
- for(i=0; i<15; i++) {
- command(tab_command[] ,i);
+ for(int i=0; i<15; i++) {
+ command(drive_backwards_M1 ,i);
+ command(drive_backwards_M2 ,i);
wait_ms(100);
}
- for(i=15; i>0; i--) {
- command(tab_command[] ,i);
+ for(int i=15; i>0; i--) {
+ command(drive_backwards_M1 ,i);
+ command(drive_backwards_M2 ,i);
wait_ms(100);
}
-*/
}
-
}