[SOLVED] Serial monitor show Bluetooth data only

Hi,

I'm working on a Arduino robot remotable by Android via Bluetooth for my high school diploma, but since I set Bluetooth in my program, the Serial Monitor show Bluetooth data only, and without any Serial.print :-\

Here is my bluetooth code:

#include <SoftwareSerial.h>
SoftwareSerial Bluetooth(0, 1);
String commande;

void setup() {
  Bluetooth.begin(9600);
  
}

// ############# Boucle principale #############
void loop() {
  if (Bluetooth.available()) {
    commande = "";
    // Récupération de la commande
    while(Bluetooth.available()) {
      commande += (char)Bluetooth.read();
    }
    Bluetooth.println("Ça fonctionne !");
  }
    
}

When I put Serial.begin(9600) in Setup() and I try Serial.println, the Serial monitor is blank
My bluetooth module is JY-MCU and I'm using the Arduino UNO

Thanks for your help :smiley:
And sorry for my english

You appear to be using pins 0 and 1 for SoftwareSerial. Move the Bluetooth connection to other pins because those two are used by hardware Serial. Put the Serial.begin() back in your program.

Thanks for your answer
Can I put RX TX on another pins than PWMs ? (All of theses are used)

Can I put RX TX on another pins than PWMs ? (All of theses are used)

Yes, with these restrictions

Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).
Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).

It works, thanks :smiley: