Uno to Pro mini to HC-05 module

Im using an arduino uno to program a Pro Mini 5v 16m 328

The program gets uploaded fine.

The program is simple.

#include <SoftwareSerial.h>

#define rxPin 3
#define txPin 4

SoftwareSerial mySerial(rxPin, txPin); // RX, TX
char myChar ; 

void setup() {
  Serial.begin(9600);   
  Serial.println("Goodnight moon!");

  mySerial.begin(9600);
  mySerial.println("Hello, world?");
}

void loop(){
  while(mySerial.available()){
    myChar = mySerial.read();
    Serial.print(myChar);
  }

  while(Serial.available()){
   myChar = Serial.read();
   mySerial.print(myChar);
  }
}

on my Serial. i only get the "Goodnight moon!"
The bluetooth doesnt send me any chars or whatever.
It gets paired but doesnt communicate with the arduino.

when I set up the hc05 direcly to UNO and upload the code there it works fine.

But on Pro mini I cant get it to work.

Please help!

Thank you in advance.

Untitled.png

Hi,

You should try with pin 2 and 3, instead of 3 and 4.

This is the code I successfully used. I send chars from the android app "BTInterface Free Trial BETA".

#include "SoftwareSerial.h"

#define RX 2
#define TX 3
#define LED 13

SoftwareSerial BTSerial(RX, TX);

void setup() {
  pinMode(LED, OUTPUT);
  digitalWrite(LED, LOW);
  BTSerial.begin(9600);
  Serial.begin(115200);
}

void loop() {
  if (BTSerial.available()) {
    switch (BTSerial.read()) {
      case '1':
        digitalWrite(LED, HIGH);
        Serial.println("Switch on the led");
        break;
      case '0':
        digitalWrite(LED, LOW);
        Serial.println("Switch off the led");
        break;
      default:
        Serial.println("Nothing changed");
    }
  }
}