Leonardo seemingly not running code

I recently bought 2 arduino leonardos (DEV 15795) https://www.sparkfun.com/products/15795

I was running timer interrupt code set up to measure and eventually use pwm to control temperature. The first board became unrecognized by windows and Arduino IDE (unable to select port or upload). After this, I assumed I must’ve accidentally touched 5V to Gd and shorted out the board or something even though the red power LED still came on, and I bought another one.

The second board worked for several days running example code and other things on this board before trying to upload the Timer interrupt code I had written. Today I went to upload the temperature control on interrupt code that compiled correctly, and my QWIIC display never showed anything and the board became unrecognizable (not even the splash screen in the setup code for my QWIIC display before the registers were even edited for the timer)

I then took the boards using an UNO as ISP and reprogrammed them both following this tutorial https://www.arduino.cc/en/Tutorial/Buil … ArduinoISP . I had the show verbose output during upload box checked, and the code uploaded successfully to the board.

Now I’ve got two boards that both seemingly should work, both flash yellow as downloading code, and yet both still wont run even the Blink example sketch on Arduino… The code uploads successfully, the light stops flashing, and then no blink or anything happens. I’m wondering if the 15795 has some sort of special bootloader on it that I need to upload differently or if there’s something else wrong. From what I can tell everything seems fine with uploading to the board, I just get no execution at all on either board.

I’d understand if my code was wrong and I had a register misnamed that messed with the timer, but after resetting the bootloader I should be fine, right?

Have you gone through the troubleshooting section of the hookup guide?

https://learn.sparkfun.com/tutorials/qw … ng-and-faq

While similar to one another, the [Arduino Leonardo and [SparkFun Pro Micro are different boards and have different bootloaders. What causes people trouble with the Pro Micro is that there are two different versions available (5V, 16MHz and 3.3V 8MHz) and choosing the wrong board definition in the Arduino IDE will “brick” your Pro Micro.

For example, Arduino defaults to the 3.3 volt 8MHz board and the IDE expects that bootloader and board are both setup to use a 8MHz clock. If you upload code to a 5 volt, 16MHz board, the bootloader will fail because it’s code is written to run at 8MHz and the code you’ve uploaded has told the board it has a 16MHz clock. Because the timing is all out of whack, the board can’t enumerate on the USB bus because the bootloader it’s running at the wrong speed.

There’s two ways to fix this.

  • - Re-flash the [u]correct[/u] bootloader.
  • - Follow the instructions in the [[troubleshooting section](https://learn.sparkfun.com/tutorials/qwiic-pro-micro-usb-c-atmega32u4-hookup-guide/all#ts-revive) of the hookup guide that shows how to recover the board.
  • [/list]

    For either case, you need to install the SparkFun board definitions for the Pro Micro first, that can also be found in the [hookup guide.](Qwiic Pro Micro USB-C (ATmega32U4) Hookup Guide - SparkFun Learn)](Qwiic Pro Micro USB-C (ATmega32U4) Hookup Guide - SparkFun Learn)](https://www.sparkfun.com/products/15795)](https://www.sparkfun.com/products/11286)