Pro micro not working after reset/powerup

Hi!
I'm in the quest of making myself a media controller with a clone pro micro.
After having some issues of the board not seeming to connect to the computer after a restart of the board, or a power cycle (unplugging and plugging again) I decided to write a simple test code

void setup() {
Serial.begin(9600);
delay(5000);
Serial.println("start");
delay(1000);
}

void loop() {
  Serial.println("test");
  delay(1000);
}

Its quite a simple code to see if the board was booting up properly.
After upload the code will work fine, I'll get a "start" and then "test" every second on the serial monitor. But after restarting the board (shorting RST to GND) it won't send anything to the serial monitor, nor will it flash the Tx led, same thing after unplugging and plugging the board. The only way i've found to get it to work again is by reuploading the code

I'd be thankful if anyone has any idea that i could try

edit: kolaha catched an error on my code, i had the budrate set to 6900 instead of 9600, i fixed it, and the problem perists

9600 ?

good catch, that was a mistype on the code, tho it still worked after upload, just corrected it on the code, uploaded, problem persists

AFAIK Micro is not for UART communication, but for USB. Are your worries about general functionality or especially COM port issue?

// Pro Micro Test Code
void setup(){}void loop()
{digitalWrite(17, LOW);   
 TXLED1; 
 delay(1000);
 digitalWrite(17, HIGH);
 TXLED0;
 delay(1000);}

here is mine test code

my main concern is that it seems to be working properly, until it gets restarted, and then it won't do something that was doing just fine before
I'm not sure if it is something i'm doing wrong, a problem with my board, or expected behavior of the micro

i'll give it a go, thanks

I just ran your code and it's working fine after restart

So basically, if i try to use serial i'll have issues?

I made joystick and racing wheel with Micro. I have some experience.
By playing around with MMJoy2 different version firmware the windows start take very long to recognize "new device", after PC restart goes better. Sometimes Windows not starting when Micro is attached. Strange board. If I need no USB HID I'll take Nano.

My original plan was to use Deej on the micro for an easy to set up volume control with control over individual apps, and use HID to run commands like mute and pause by using media keys

Yeah, i got it running fine on a nano, but i wanted to set it up on the micro so i could also set up some buttons for stuff like play/pause

2 separated devices? I am not sure but I think COM port and USB HID is not simultaneous possible.

i doubt it's possible at the same time, but i was thinking on basically, having the Serial on all the time, but when a button is pressed i'd turn it off, do the button, and then turn serial back on, if that makes sense

not really nice every time to hear "new device attached" and "device disconnected" sounds.
keep it simple

that`s actually a really good point you are making, the noises would be annoying, haven't thought about that

guess i'll have to look for some other way of controlling volume of individual apps through the pro micro, or forget about the media keys, and just keep Deej running on the nano

Thanks fo the help!

not necessary. even if you has only 1 USB socket on your PC case you can take USB hub. even more: put USB hub into DIY case and connect both Nano and Micro to it. It will look as one device.

not a bad idea actually, can get a smallish one, get the board out of its case and throw everything in a custom case, i'll look into it tomorrow
Thanks!

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