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:
- 20:ed2094eb0687
- Parent:
- 19:370efb0ce814
- Child:
- 21:16619d0c69ad
--- a/main.cpp Mon May 09 13:00:02 2022 +0000
+++ b/main.cpp Tue May 10 14:43:22 2022 +0000
@@ -2,10 +2,11 @@
#include "home.h"
int main(){
- //int posicoes_x[] = {1024, 512};
-// int posicoes_y[] = {1024, 512};
-// int posicoes_z[] = {1024, 512};
-// int pegas[] = {0, 2};
+ int posicoes_x[] = {1024, 512, 1536};
+ int posicoes_y[] = {1024, 512, 1536};
+ int posicoes_z[] = {1024, 512, 1536};
+ int pegas[] = {0, 1, 1};
+ int referenciar = 0;
while(1){
/*display_to_lcd("Bem vindo /n");
display_to_lcd("Prosseguir");
@@ -21,19 +22,26 @@
last_update()
}
}*/
- home();
- // int numero_pegas = 0;
-// int x_pega = posicoes_x[0];
-// int y_pega = posicoes_y[0];
-// int z_pega = posicoes_z[0];
-//
-// for (int i=0; i < 2; i++)
-// {
-// int x_posicao = posicoes_x[i];
-// int y_posicao = posicoes_y[i];
-// int z_posicao = posicoes_z[i];
-// numero_pegas = pegas[i];
-// jog (x_posicao, y_posicao, z_posicao, x_pega, y_pega, z_pega, numero_pegas);
-// }
+ //if (referenciar == 0)
+// {
+// home();
+// referenciar = 1;
+// }
+ int numero_pegas = 0;
+ int x_pega = posicoes_x[0];
+ int y_pega = posicoes_y[0];
+ int z_pega = posicoes_z[0];
+ if (referenciar == 0)
+ {
+ for (int i=0; i < 3; i++)
+ {
+ int x_posicao = posicoes_x[i];
+ int y_posicao = posicoes_y[i];
+ int z_posicao = posicoes_z[i];
+ numero_pegas = pegas[i];
+ jog (x_posicao, y_posicao, z_posicao, x_pega, y_pega, z_pega, numero_pegas);
+ }
+ referenciar = 1;
+ }
}
}
