Serial monitor displaying random characters

Hi everyone, I'm trying to set up an L298n to be able to control the speed of two DC motors (VIA BLUETOOTH), using an arduino UNO.

I created an MIT app inventor app and am trying to use the slider function on the app to control the motor speed. But when I open the serial monitor to see what is coming in from the HC05 that I have connected to the RX and TX pins on the arduino as well as the 5v and GND some gibberish comes up. I have attached an image of what the serial monitor produces and my MIT app inventor blocks. I have read that alot of people get this issue via baud rate but mine has already been changed to 34800.
Any help is greatly appreciated in solving this issue.
Here's the code:

int enA = 6;
int enB = 3;
int in1 = 4;
int in2 = 9;
int in3 = 8;
int in4 = 2;
int val2;




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



  pinMode(enA, OUTPUT);
  pinMode(enB, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);

  digitalWrite (in1, HIGH);
  digitalWrite (in2, LOW);
  digitalWrite (in3, HIGH);
  digitalWrite (in4, LOW);





}

void loop() 
{

 
  if (Serial.available() >= 0 )
  {
    unsigned int a = Serial.read();
    unsigned int b = Serial.read();
    unsigned int val = (b * 256) + a;
   Serial.println(val); 

    if (val >= 0 && val <= 255)
    {
      analogWrite(enA, val);
    }

    if (val >= 1000 && val <= 1255)
    {
      val2 = val - 1000;
      analogWrite(enB, val2);
    }

  
}
}
}

Unless you changed it, the baud rate for serial with the HC05 is 9600 (38400 for AT commands).

I use a software serial port to communicate with HC05s and an Uno. Connecting the HC05 and serial monitor (USB serial) both to the hardware serial port usually will not work well.

Thanks, for the reply.
I did change the Baud rate using the AT commands to 38400
Do you know of any tutorials that could help me with the software serial port?

Thanks.

Just a hint, if the baud rate is wrong the AT commands will not work. This response is to help you get started in solving your problem, not solve it for you.
Good Luck & Have Fun!
Gil

Do you know of any tutorials that could help me with the software serial port?

The software serial reference is a starting place.

Note that 38400 baud is as fast as the software serial port will work in my experience.