- Mon Nov 05, 2018 6:49 am
The best I could find, but not able to test as I do not have a Pro-micro, is in the file <arduino_install_dir>/ packages/Sparkfun/hardware/avr/1.1.12/variants/promicro/pins_arduino.h. At least on my Ubuntu system, you will have to look for similar structure on your PC.
In there is a definition of switching off the TX led : #define TXLED0 PORTD |= (1<<5)
AND switching on : #define TXLED1 PORTD &= ~(1<<5).
The TXled is connected to to PD5.
If you comment those 2 definition out and try to recompile your sketch it will fail as USBcore.cpp is expecting those. Try to change the definitions to PORTD6, as that is not used on the pro-micro and recompile /upload the sketch :
#define TXLED0 PORTD |= (1<<6)
#define TXLED1 PORTD &= ~(1<<6)
In the same file there is also : #define LED_BUILTIN_TX 30. Pin 30 is mapped to PD5 in the structures underneath and you should not change. This LED_BUILTIN_TX is normally a global variable that one can use in a sketch ( e.g. digitalwrite (LED_BUILTIN_TX, HIGH)