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 filesystem TextLCD
Fork of Projeto_Mecatronico by
Diff: main.cpp
- Revision:
- 29:2ec7b2213197
- Parent:
- 28:84a60377564e
- Child:
- 30:9e9c06431b3b
--- a/main.cpp Thu Jun 02 23:20:44 2022 +0000
+++ b/main.cpp Fri Jun 03 22:15:26 2022 +0000
@@ -18,7 +18,7 @@
void abaixar_velocidade()
{
- tempo=0.004;
+ tempo=0.0032;
}
void aumentar_velocidade()
@@ -48,18 +48,12 @@
if(vel_inicial==0) {
tempo=0.002;
} else {
- tempo=0.004;
+ tempo=0.0032;
}
velocidade.fall(&aumentar_velocidade);
velocidade.rise(&abaixar_velocidade);
emergencia.rise(&estado_emergencia_funcao);
- printf("oi");
while(1) {
- acionar_perifericos (1, 0);
- wait(2);
- acionar_perifericos (0, 0);
- wait(20);
-
if(flag==0) {
mostrar_no_lcd("Bem-Vindo!\nAperte Prosseguir para comecar.");
acionar_perifericos (0, 0);
@@ -77,8 +71,7 @@
wait(0.5);
if(arrow_right_button==0) {
mostrar_no_lcd("Indo para home...");
- acionar_perifericos (1, 0);
- // home();
+// home();
wait(0.5);
flag_main=1;
}
@@ -91,7 +84,6 @@
flag=1;
}
if(arrow_right_button==0) {
- acionar_perifericos (1, 0);
setar_posicoes();
flag_main=0;
@@ -141,6 +133,8 @@
mostrar_no_lcd("JOG finalizado. Para recomecar aperte Prosseguir.");
flag_main=0;
}
+ else if(enter_button==0){
+ flag_main=0;}
}
}
