1

Topic: Problems when I read data

Can anybody help me? I try to write a simple code to send the joystick data to the Serial monitor, through the HC-05 module, but the reading comes out very dirty. My code is:

     ...
void setup()
{
  RemoteXY_Init ();
  Serial.begin(38400);

}

void loop()
{
  RemoteXY_Handler ();

  Serial.print("X: ");
  Serial.print(RemoteXY.joy_x);
  RemoteXY_delay(50);
  Serial.print(";   Y: ");
  Serial.println(RemoteXY.joy_y);
  RemoteXY_delay(50);
}


And then , my ridings are:


U⸮⸮X: 4;   Y: -43
X: 4U⸮⸮;   Y: -43
U⸮⸮X: 4;   Y: -43
X: 4;   Y: -43
U⸮⸮X: -16U⸮⸮;   Y: 100
U⸮⸮X: -16;   Y: 100
...

2

Re: Problems when I read data

Most likely you use one port for RemoteXY and for console output