Problems with sending data between two HC-05 modules

Sorry for any possible use of bad English haha!

well, I am using two UNO boards, two HC-05 bluetooth modules, i paired them correctly using AT commands and set their baud rate to 38400,0,0 using AT+UART= 38400,0,0

they paired correctly and blink the little LED light in sync, I also uploaded my basic sketch by removing the TX, and RX pins.

now here is where the problem rises:

I am trying to send 1 and 0 with an interval of 10 seconds inbetween them

slave code:

#define ledPin 13

int state = 0;


void setup() {
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, LOW);
  Serial.begin(38400);
}

void loop() {
 if(Serial.available() > 0){
    state = Serial.read();
 }

 if (state == '1') {
  digitalWrite(ledPin, HIGH);
 }
 else if (state == '0') {
  digitalWrite(ledPin, LOW);
 }
}

This is the master code:

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

void loop() {
  Serial.write('1');
  delay(10000);
  Serial.write('0');
  delay(10000);
}

I uploaded the codes to both arduino devices while removing the TX and RX pins
my connections were:

Arduino HC05
TX RX
RX TX
gnd gnd
+5v +5v

yet the led at pin 13 does not light up i don't know why
help would be appreciated!
thanks in advance

I’d suggest you have a look at this :

Make sure RX and TX are wired properly for both modules. Posting a pic of your wiring will help if you're unsure.

Also, if you want an easy to use interface to transfer data via serial, check out SerialTransfer.h. It's a super easy to use, efficient, and very robust library that automatically transfers data from one Arduino to another. If you want to learn more, install it through the Arduino IDE's Libraries Manager (search "SerialTransfer") and check out the examples included in the library.