Uploading problems for bluetooth

I am trying to make a small Bluetooth car and I am testing the Bluetooth module. When i try to upload the code, it doesn't work. The uploading message just stays there.

Here is the code:

#include <SoftwareSerial.h>
SoftwareSerial mySerial(0, 1);
int a;
void setup() {

  Serial.begin(9600);
  mySerial.begin(9600);
}

void loop() {
  if (mySerial.available()) {
    a = mySerial.read();
    Serial.print(a);
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}

Hi @doublecheese817. By this, do you mean that the "Uploading... notification remains in the bottom right corner of the Arduino IDE window?:

yes

OK, this bug is tracked by the Arduino IDE developers here:

The lead developer is actually investigating the problem right now. Unfortunately the IDE team is not able to reproduce the fault, which makes the investigation very difficult. The developer is requesting assistance from the users who are affected by the bug. If you would like to help out, you can follow the instructions here:

https://github.com/arduino/arduino-ide/issues/1356#issuecomment-1482848858

If you don't have a GitHub account, you are welcome to post the logs here and I'll relay them to the developer.

Which board? On a lot of boards, pins 0 and 1 are also used for communication with the PC.
And connecting anything to pins 0 and 1 can result in upload problems.

  1. If the Bluetooth module is not disconnected during upload.
  2. If you run the sketch after succesful upload, Serial and SoftwareSerial will interfere with each other for e.g. Uno, Nano and Pro Mini.

Thanks, @sterretje . I changed pins to 2 and 3 and the result worked.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.