Projeto Mecatrônico - 2020 - G3 / Mbed 2 deprecated Movimentacao

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
terhorst
Date:
Wed Jun 24 18:20:22 2020 +0000
Parent:
5:b122956ef0d3
Commit message:
.

Changed in this revision

movimentacao.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/movimentacao.cpp	Tue Jun 23 20:18:33 2020 +0000
+++ b/movimentacao.cpp	Wed Jun 24 18:20:22 2020 +0000
@@ -21,7 +21,7 @@
 DigitalIn SensorParadaX_1(PA_8);
 DigitalIn SensorParadaY_1(PA_9);
 DigitalIn SensorParadaZ_1(PA_10);
-DigitalIn Fim(PA_11);
+DigitalIn Fim(D4);
 DigitalOut Pipeta(D15);
 Serial pc(USBTX, USBRX);
 Timer debounce;
@@ -285,7 +285,7 @@
         if (paradaX_esquerda == 1) {
             movimentacao_inicial_X_esquerda(); //roda a função de movimentação do eixo X
             
-            if (SensorX_1 == 1) {
+            if (SensorX_1 == 0) {
                 Posicao_inicial[0] = 0;
                 paradaX_esquerda = 0;
                 parada_total_X = 1;
@@ -298,7 +298,7 @@
         if (paradaY_esquerda == 1) {
             movimentacao_inicial_Y_esquerda(); //roda a função de movimentação do eixo X
             
-            if (SensorY_1 == 1) {
+            if (SensorY_1 == 0) {
                 Posicao_inicial[1] = 0;
                 paradaY_esquerda = 0;
                 parada_total_Y = 1;
@@ -311,7 +311,7 @@
         if (paradaZ_esquerda == 1) {
             movimentacao_inicial_Z_esquerda(); //roda a função de movimentação do eixo X
             
-            if (SensorZ_1 == 1) {
+            if (SensorZ_1 == 0) {
                 Posicao_inicial[2] = 0;
                 paradaZ_esquerda = 0;
                 parada_total_Z = 1;