I have connected a RN-42 bluetooth (TX-D0, RX-D1, VCC-5V, GND_GND) to arduino.The problem is that when I run this code ,nothing happens it just upload to infinite or it doesn't. I am checking with tera term. Is there a problem with the connection of the pins? Also when I pair my android phone to the bluetooth it says paired on the phone but the blue light of the bluetooth doesn't switch on, like it's not connected.

  #include <SoftwareSerial.h>// import the serial library
   SoftwareSerial Genotronex(1, 0); // TX,RX
   int ledpin=13; // led on D13 will show blink on / off
   int BluetoothData; // the data given from Computer

  void setup() {
  // put your setup code here, to run once:
   Genotronex.println("Bluetooth On please press 1 or 0 blink LED ..");

  void loop() {
    // put your main code here, to run repeatedly:
  if (Genotronex.available()){
   if(BluetoothData=='1'){   // if number 1 pressed ....
  Genotronex.println("LED  On D13 ON ! ");
  if (BluetoothData=='0'){// if number 0 pressed ....
   Genotronex.println("LED  On D13 Off ! ");
   delay(100);// prepare for next data ...
  • 1
    There is no need to use software serial on the hardware UART, the D0 and D1 pins are for communication with the PC, in line with what Owen answered try his suggestion.
    – RSM
    Commented Aug 4, 2015 at 7:32
  • Are you sure that the bluetooth module is already connected/paired correctly? Is your bluetooth module in master or slave mode?
    – Thomas S.
    Commented Sep 27, 2015 at 15:23
  • VCC to 3.3V? sparkfun.com/datasheets/Wireless/Bluetooth/rn-42-ds.pdf Commented Jan 27, 2016 at 22:55

4 Answers 4


As commenter by RSM

The issue you are facing is because you are using pins 0 and 1

These are used by the arduino for uart.

So for starters please use any pin other that 0 and 1. But if you insist that you do need to use these pins, then you don't need softwareserial you can use the default serial itself, but you will need to disconnect the bluetooth while programming.


If you use RX, and TX in default pin then it is not necessary that you should include SoftwareSerial library.


The simplest solution to this is to just unplug the Bluetooth module from the TX and RX ports and click to upload. Your sketch will be uploaded and you can plug the pins back. For a permanent solution use the digital pins aside 1 and 0 because they are the same pins your computer uses to upload your sketch to the Arduino board.


Try taking off the bluetooth module, this will allow communication with the computer, not the bluetooth module. I had the same problems with my hc-06, and have not solved the ladder yet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.