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?:
OK, this bug is tracked by the Arduino IDE developers here:
opened 06:33PM - 05 Jan 23 UTC
topic: code
type: imperfection
### Describe the problem
I have a dual boot system with windows 10 and window… s 11.
In windows 10 I have no problem, but in windows 11, the "Uploading" process:
![image](https://user-images.githubusercontent.com/117047438/210853911-4b2d091e-9c8a-4cf3-8246-7707ec593af4.png)
goes on and on even though the verbose upload output shows a completion of the job (I assume):
```text
Sketch uses 3222 bytes (9%) of program storage space. Maximum is 32256 bytes.
Global variables use 307 bytes (14%) of dynamic memory, leaving 1741 bytes for local variables. Maximum is 2048 bytes.
"C:\Users\wormi\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude" "-CC:\Users\wormi\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf" -v -V -patmega328p -carduino "-PCOM4" -b115200 -D "-Uflash:w:C:\Users\wormi\AppData\Local\Temp\arduino-sketch-0D4DC7263DFA72C1021B25AD2D7907C6/TestWriter.ino.hex:i"
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\wormi\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"
Using Port : COM4
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\wormi\AppData\Local\Temp\arduino-sketch-0D4DC7263DFA72C1021B25AD2D7907C6/TestWriter.ino.hex"
avrdude: writing flash (3222 bytes):
Writing | ################################################## | 100% 0.53s
avrdude: 3222 bytes of flash written
avrdude done. Thank you.
```
### To reproduce
Upload the following sketch to an Arduino board from a Windows 11 machine:
```cpp
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
char Mymessage[10]; //Initialized variable to store recieved data
void setup() {
Serial.begin(9600);
// Begin the Serial at 9600 Baud
mySerial.begin(9600);
}
void loop() {
mySerial.readBytes(Mymessage,5); //Read the serial data and store in var
Serial.println(Mymessage); //Print data on Serial Monitor
delay(1000);
}
```
### Expected behavior
Arduino IDE is released from the "Uploading" state when the upload process is finished.
### Arduino IDE version
2.0.3 CLI version 0.29.0
### Operating system
Windows
### Operating system version
Windows 11 Pro version 22H2
### Additional context
It seems windows 11 is still occupying the USB communication somehow and not releasing it.
---
Related: https://github.com/arduino/arduino-ide/issues/1356
---
#### Additional reports
- https://forum.arduino.cc/t/often-stuck-on-uploading-ide-2-0-3/1063796/3
- https://forum.arduino.cc/t/often-stuck-on-uploading-ide-2-0-3/1063796/8
- https://forum.arduino.cc/t/often-stuck-on-uploading-ide-2-0-3/1063796/14
- https://forum.arduino.cc/t/often-stuck-on-uploading-ide-2-0-3/1063796/15
- https://forum.arduino.cc/t/often-stuck-on-uploading-ide-2-0-3/1063796/17
- https://forum.arduino.cc/t/often-stuck-on-uploading-ide-2-0-3/1063796/18
- https://forum.arduino.cc/t/often-stuck-on-uploading-ide-2-0-3/1063796/22
- https://forum.arduino.cc/t/arduino-stuck-on-uploading-only-in-windows-11/1073719
- https://forum.arduino.cc/t/new-ide-not-doing-anything/1086797
- https://forum.arduino.cc/t/arduino-2-0-upload-issue/1090859
- https://forum.arduino.cc/t/uploading-blocked/1095177
- https://forum.arduino.cc/t/arduino-error-message-jan21/1080560/33
<a name="workaround"></a>
#### Workaround
1. Select **File > Quit** from the Arduino IDE menus.
1. Restart Arduino IDE.
#### Keywords
- hang
### Issue checklist
- [X] I searched for previous reports in [the issue tracker](https://github.com/arduino/arduino-ide/issues?q=)
- [X] I verified the problem still occurs when using the latest [nightly build](https://www.arduino.cc/en/software#nightly-builds)
- [X] My report contains all necessary details
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.
If the Bluetooth module is not disconnected during upload.
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.
system
Closed
September 21, 2023, 3:45pm
7
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.