user38863: I successfully connected two Bluetooth modules, HC-05 and HC-06 like on this website:
http://www.martyncurrey.com/connecting-2-arduinos-by-bluetooth-using-a-hc-05-and-a-hc-06-pair-bind-and-link/
I have an Arduino Nano that's the slave (HC-06) and an Arduino Mega that is the master (HC - 05) and there's is the code for both of them:
Reveiver - Master
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX | TX
String Data = "";
void setup() {
    Serial.begin(9600);
    mySerial.begin(9600);  
}

void loop(){
    while (mySerial.available()){
        Serial.println(mySerial.read())  
    }
}

Sender - Slave
#include <SoftwareSerial.h>
SoftwareSerial BTserial(11, 10); // RX | TX

int c = 100;

void setup() {
Serial.begin(9600);
BTserial.begin(9600);  
}

void loop(){
     BTserial.println(c);
}

I tried
BTserial.write(c) 

and doesn't work either, I receive numbers like 245,255. And when I change the data that I'm sending the numbers are different, so I know that they are communicating, I think it's a variable problem, but I tried a bunch of codes of the internet that supposedly work, but it doesn't seem to work for this case.

user37622: println prints the int variable c as string "100" with /r/n at the end. And you read it as bytes with read and print the bytes as numbers with new line at the end. So you get ascii values of 1, 0, 0, \r and \n.
use write() to write a byte to Bluetooth and to Serial Monitor

38863: <p>I successfully connected two Bluetooth modules, HC-05 and HC-06 like on this website:</p>

<p><a href="http://www.martyncurrey.com/connecting-2-arduinos-by-bluetooth-using-a-hc-05-and-a-hc-06-pair-bind-and-link/" rel="nofollow noreferrer">http://www.martyncurrey.com/connecting-2-arduinos-by-bluetooth-using-a-hc-05-and-a-hc-06-pair-bind-and-link/</a></p>

<p>I have an Arduino Nano that's the slave (HC-06) and an Arduino Mega that is the master (HC - 05) and there's is the code for both of them:</p>

<p><strong>Reveiver - Master</strong></p>

<pre><code>#include &lt;SoftwareSerial.h&gt;
SoftwareSerial mySerial(10, 11); // RX | TX
String Data = "";
void setup() {
    Serial.begin(9600);
    mySerial.begin(9600);  
}

void loop(){
    while (mySerial.available()){
        Serial.println(mySerial.read())  
    }
}
</code></pre>

<p><strong>Sender - Slave</strong></p>

<pre><code>#include &lt;SoftwareSerial.h&gt;
SoftwareSerial BTserial(11, 10); // RX | TX

int c = 100;

void setup() {
Serial.begin(9600);
BTserial.begin(9600);  
}

void loop(){
     BTserial.println(c);
}
</code></pre>

<p>I tried</p>

<pre><code>BTserial.write(c) 
</code></pre>

<p>and doesn't work either, I receive numbers like 245,255. And when I change the data that I'm sending the numbers are different, so I know that they are communicating, I think it's a variable problem, but I tried a bunch of codes of the internet that supposedly work, but it doesn't seem to work for this case.</p>
 37622: <p>println prints the int variable c as string "100" with /r/n at the end. And you read it as bytes with read and print the bytes as numbers with new line at the end. So you get ascii values of 1, 0, 0, \r and \n.</p>

<p>use write() to write a byte to Bluetooth and to Serial Monitor</p>
