如何“重置"?一个Arduino板? [英] How can I "reset" an Arduino board?
问题描述
我已将 sketch 上传到 Arduino Uno,其循环类似于这样:
I've uploaded a sketch to an Arduino Uno whose loop is something like this:
void loop(){
Serial.println("Hello, World!");
}
所以,现在,我无法再上传任何内容,因为 IDE 显示端口已在使用中".
So, now, I can't upload anything anymore, because the IDE says "port already in use".
有没有办法在没有其他程序员的情况下重置"Arduino?
Is there a way to "reset" the Arduino without another programmer?
没有其他东西在使用串口,一切都很好,直到我上传了之前的草图.
Nothing else is using the serial port, and everything went just fine until I uploaded the previous sketch.
我发现了一些有趣的事情:
I've found some interesting things:
推荐答案
试试以下:
- 准备基本的空程序(空设置、循环等)
- 编译它.
- 使用芯片上的硬件按钮重置 Arduino
- 按 Ctrl + U 上传您的代码.
- 如果不成功 - 达到 3.
- Prepare the basic empty program (empty setup, loop, etc.)
- Compile it.
- Reset the Arduino using the hardware button on the chip
- Press Ctrl + U to upload your code.
- If unsuccessful - got to 3.
在引导加载程序启动程序之前有一个延迟,请按照您的时间安排.当我的 Arduino 代码中的错误每 500 ms 执行一次软重置时,它对我有用.
There is a delay before the boot loader starts the programs, just work on your timing. It worked for me when a bug in my Arduino's code was executing a soft reset every 500 ms.
这篇关于如何“重置"?一个Arduino板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!