How can I “reset” an Arduino board?

前端 未结 21 1788
不思量自难忘°
不思量自难忘° 2020-12-13 01:07

I\'ve uploaded a sketch to an Arduino Uno whose loop is something like this:

void loop(){
    Serial.println(\"Hello, World!\");
}

So, now,

相关标签:
21条回答
  • 2020-12-13 01:14

    I had this issue as well. I tried the above methods and none seemed to work, however something that did work (somehow, not sure if it was just a freak thing or it is actually a way to do it) was:

    1. Unplug USB from the Arduino
    2. Press and hold the reset button
    3. Plug in USB and power up
    4. Continue holding and upload the sketch. Once it's done uploading, release the reset button.
    0 讨论(0)
  • 2020-12-13 01:14

    Here is the best way that works out if you are trying to program through the USB cable:

    1. Ground the Tx signal on the board (connect digital I/O #1 to GND)
    2. Plug the USB cable
    3. Upload a new program
    4. Remove the USB cable
    5. Remove Tx grounding

    You are all set!

    0 讨论(0)
  • 2020-12-13 01:15

    The only way it worked for me for arduino nano 33 iot is via pressing the reset button on the board continuously many time then press uoplad!

    0 讨论(0)
  • 2020-12-13 01:15

    I also had your problem,and I solved the problem using the following steps (though you may already finish the problem, it just shares for anyone who visit this page):

    1. Unplug your Arduino
    2. Prepare an empty setup and empty loop program
    3. Write a comment symbol '//' at the end of program
    4. Set your keyboard pointer next to the '//'symbol
    5. Plug your Arduino into the computer, wait until the Arduino is completely bootloaded and it will output 'Hello, World!'
    6. You will see the 'Hello, World!' outputting script will be shown as comment, so you can click Upload safely.
    0 讨论(0)
  • 2020-12-13 01:16

    I had the same problem on two Arduinos (one Uno, and one Modern Device Freeduino/USB Host board) and the window between reset and the beginning of serial port usage was so small that it was impossible to upload.

    I finally fixed the problem by purchasing another Arduino Uno and building an ISP cable per these instructions, and using it to flash the Bare Bones app from the examples into each inaccessible board, using Arduino IDE version 0023, following these instructions to change preferences.txt. (Be sure to save the original file before editing it so you can replace it after you've rescued your Arduino.)

    It took one quick upload to fix each board. Such a fast fix after so much grief. You might not want to purchase another Arduino, but consider these benefits:

    • You can overwrite the bootloader on your Arduino to gain more space.
    • Once the bootloader is overwritten, the board will boot faster.
    • Supposedly you can program raw AVRs for special projects, but I have not tried this: Google for ArduinoISP
    • It will quickly fix Arduinos that you block in the future.
    • You can now safely experiment to find ways to prevent serial port usage from locking up the device in the future.
    0 讨论(0)
  • 2020-12-13 01:20

    Be sure you are not accessing the serial port from a terminal. That loop (or any code) should not prevent the Arduino from being programmed.

    0 讨论(0)
提交回复
热议问题