i have a pro micro and have it typing but there was an error and now it will not stop so i need to hard reset it PLEASE help
Have you tried disconnecting power? What happens if you power up again? You will get more help if you tell us what you have done to try and fix it and also post your code and wiring.
If you do the "double tap reset", you should be able to upload a harmless sketch to replace your malfunctioning one...
https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/troubleshooting-and-faq
westfw:
If you do the "double tap reset", you should be able to upload a harmless sketch to replace your malfunctioning one...
Pro Micro & Fio V3 Hookup Guide - SparkFun Learn
What the heck is a "double tap reset"? Never heard of that one.
A bunch of the SAM bootloaders (Sparkfun and Adafruit, at least) will enter the bootloader "permanently" or at least "longer than usual" if they get a hardware reset while they are already running the bootloader (so two taps on the reset button within a second, usually.) It's pretty handy for when your application somehow manages to disable the auto-reset capability.
it is supposed to type when i press a button, but for some reason it would type infinitely. i have disconnected the button, still has the problem. i tried double tap reset, it did not work. it needs to have the code reset, but every time i try to upload a blank sketch, it says that there was an error.
I don't have a Pro Micro but the following should work
Disconnect Pro Micro.
2)
Open IDE and load harmless sketch (e.g. blink).
3)
While keeping board in reset, connect it. Keep it in reset.
4)
Upload sketch; board still in reset.
5)
At the moment that the IDE reports the memory usage, release the reset of the board.
To make it easier, you can enable tools -> preferences -> enable verbose output during upload. Once the IDE has displayed the memory statistics, you will see lines like below and you can release the reset
PORTS {COM3, COM4, COM26, } / {COM3, COM4, COM26, } => {}
alecjensen:
it is supposed to type when i press a button, but for some reason it would type infinitely. i have disconnected the button, still has the problem.
You probably have a floating input; use the internal pull-up resistor (or an external pull-down depending how the button is wired).
// wire button between pin and ground
pinMode(yourButtonPin, INPUT_PULLUP);
if (digitalRead(yourButtonPin) == LOW)
{
send something
}
alecjensen:
it needs to have the code reset, but every time i try to upload a blank sketch, it says that there was an error.
What error?
sterretje:
I don't have a Pro Micro but the following should work
Disconnect Pro Micro.
2)
Open IDE and load harmless sketch (e.g. blink).
3)
While keeping board in reset, connect it. Keep it in reset.
4)
Upload sketch; board still in reset.
5)
At the moment that the IDE reports the memory usage, release the reset of the board.To make it easier, you can enable tools -> preferences -> enable verbose output during upload. Once the IDE has displayed the memory statistics, you will see lines like below and you can release the reset
PORTS {COM3, COM4, COM26, } / {COM3, COM4, COM26, } => {}
How do I select the port when it is in reset?
I'm not sure if it matters too much. As far as I understand it, the lines PORTS {COM3, COM4, COM26, } / {COM3, COM4, COM26, } => {} indicate that it iterates through the ports resetting them till it finds a port with the bootloader.
Else it should be the original port that was selected before. So hook it up, select the correct port and next go through the steps described.
With the Arduino IDE I have tried to upload code without selecting a port and it always fails for me. So I do not beleive this would work.
I've dusted of my Leonardo and you're right that with no (or incorrect) COM port selected, the upload will fail.
I've loaded a sketch similar to yours (spamming the PC with "A") and I do manage to get it to upload an empty sketch.
My steps
1)
open empty sketch
2)
connect Leonardo; it will spam the sketch
3)
select the correct com port
4)
disconenct the Leonardo
5)
fix the sketch so it will compile (if needed)
6)
connect Leonardo while keeping it in reset
7)
upload empty sketch
8)
when you see the lines with the "PORTS {COM1, } / {COM1, } => {}", release the reset.
Result
Sketch uses 3618 bytes (12%) of program storage space. Maximum is 28672 bytes.
Global variables use 149 bytes (5%) of dynamic memory, leaving 2411 bytes for local variables. Maximum is 2560 bytes.
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, } => {}
PORTS {COM1, } / {COM1, COM7, } => {COM7, }
Found upload port: COM7
C:\Users\Wim\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\Wim\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega32u4 -cavr109 -PCOM7 -b57600 -D -Uflash:w:C:\Users\Wim\AppData\Local\Temp\arduino_build_980233/sketch_apr27b.ino.hex:i
...
...
Writing | ################################################## | 100% 0.29s
avrdude: 3618 bytes of flash written
avrdude: verifying flash memory against C:\Users\Wim\AppData\Local\Temp\arduino_build_980233/sketch_apr27b.ino.hex:
avrdude: load data flash data from input file C:\Users\Wim\AppData\Local\Temp\arduino_build_980233/sketch_apr27b.ino.hex:
avrdude: input file C:\Users\Wim\AppData\Local\Temp\arduino_build_980233/sketch_apr27b.ino.hex contains 3618 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.04s
avrdude: verifying ...
avrdude: 3618 bytes of flash verified
avrdude done. Thank you.
COM1 is a default port and not the Leoardo (which was COM8 in my case). At the moment that I release the reset, I get a COM1 and COM7 instead of only COM1.
The upload starts after the "Found upload port: COM7"
If the above does not work (read ProMicro instead of Leonardo), I think that the best solution is to burn the boot loader; you need a programmer or another Arduino to do so.
Except when it is plugged in, I cannot move the mouse. Is there a way to only send the code but not have the arduino send the command to spam "a"?
I might have had that problem initially, probably after I spammed the PC for too long, can't remember for sure. If so, a reboot solved that issue.
I'm basically out of options. Burning the bootloader will be the easiest; you'll need another Arduino or a programmer.
Not sure if you've seen this and if not sure if it will solve your problem (seeing that your mouse and keyboard are 'buggered'): Pro Micro & Fio V3 Hookup Guide - SparkFun Learn
Reburning bootloader with another Arduino or a standalone ISP programmer will always recover a micro that's inoperable because it's trying to do something particularly perverse with USB.
You should always have multiple microcontrollers on hand - certainly always a nano or two, IMO, even if your main tasks are with stuff that has native usb
I added a pulldown resistor, but that did not help. I have tried everything, but it still is not working.
Did you try to burn the boot loader?
I cannot burn the bootloader to the micro, it says that it failed when I try.
You used another programmer or anonther Arduino as a programmer? Or did you try via USB?
If the latter, that does not work.
I used ArduinoISP with an UNO as the ISP, it did not work.