// FUNCION LEER TRAMA
void modo_manual(){
while(inByte != 'F'){
if (Serial.available() > 0){
inByte = Serial.read();
motor[x] = inByte;
x++;
}
}
if(inByte == 'F'){
x=0;
//lcd.clear();
MOTORX = motor[0];
MOTORY = motor[1];
MOTORZ = motor[2];
}
movpaso(MOTORX,MOTORY,MOTORZ);
}
void movpaso(int MOTORX, int MOTORY, int MOTORZ){
m=motorX*MOTORX;
b=motorY*MOTORY;
h=motorZ*MOTORZ;
//numero de vueltas en X y Y para hacer el recorrido del objeto
for (int j=1; j<=((MOTORX/10)+1); j++){
if ((j%2)==1)
{
for (int i=0; i <=(1.1*MOTORY); i++){
mymotorY.step(140);
}
}
else {
for (int i=0; i <=(1.1*MOTORY); i++){
mymotorY.step(-140)
}
}
if(j<=(MOTORX/10)){
for(int n=0;n<11;n++){
mymotorX.step(140);
}
}
}
}