Help with code servos and mini joystick XY

Hello,

Greetings gentlemen, I need your help for programming my project, which I have the problem with the movements
servo main (4 engines) and another servo that moves a ping sensor. The problem is that I have to move forward and turn left or right, the robot stops only move a few degrees with the mini joystick and this happened to me right and reverse. I have two joystick YX Model (KEYES sjoys), the which need the robot to move by degrees and not stop to move in any direction.

Please could help me on how to solve this problem or how I can add additional code to test? accompanying the
codes of transmitter and receiver, which in turn helps them to expect any project need.

Greetings!

emisor_final.ino (6.43 KB)

receptor_final.ino (8.8 KB)

Which of those two sketches causes the problems?

I do not know which of the two codes I make changes. Both codes are working but as noted above, it is not possible that the movements are constant when moving from one place to another. Thanks for responding.

The Issuer will use the following:

  • 2 mini joystick XY
  • Arduino Mega R3
  • Xbee pro 2

The receiver uses the following:

  • 4 Servos 12v
  • Arduino Mega R3
  • Xbee pro 2
  • 2 modules
  • Ping Sensor
  • 2A Dual Motor Controllers

The below discussion may have some info of use.

http://forum.arduino.cc/index.php/topic,157967.0.html

Estuve buscando y no veo algo referente entre ambos codigos con xbee. Favor me podrĂ­an indicar alguno de prueba que tengan? gracias.

At the receiver I have the following code, which does not like to leave work in degrees of movement from the joystick.
Help!!!!!

//////////////////////////////////////////////
//Move the servo Vertical up
if(boton5)
{
posV+=grados;
if(posV>180)
{
posV=180;
}
}

//Move the servo Vertical down
if(boton6)
{
posV-=grados;
if(posV<grados)
{
posV=grados;
}
}

//Horizontal Move servo right
if(boton8)
{
posH+=grados;
if(posH>180)
{
posH=180;
}
}

//Move the servo Horizontal left
if(boton7)
{
posH-=grados;
if(posH<grados)
{
posH=grados;
}
}
servoH.write(posH);
servoV.write(posV);

}
}

Help!!!!!

Perhaps the folks at http://snippets-r-us.com can help you with your snippets. We can't.