Dear all,
according to this article GOLEM, it is possible to remove two Arduino Pro Micro LEDs to have two new pins usable with I/O. After removing the two leds and soldering the cables on the pads how is it possible to access the two pins from code in Arduino IDE?
Thank you
Edit: Seems that this code compile correctly.. so B0 and d5 as Pin Number works?
Well, did you try using the pins using those names?
Perhaps you haven't gone to the trouble of modifying your Pro Micro yet.
Found this, seems plausible
The TX LED is connected to PD5 (D30) and the RX LED is connected to PB0 (D17). If you want to use them as generic I/O pins you will need to modify the pins_arduino.h file for the board in the Arduino core and clear the TX/RX LED preprocessor defines so that the USB core doesn't toggle the pull-up state (PORT register).
So PD and PB are references to the physical ports on the pro micro. PD5 is pin 5 on port D, PB0 is pin 0 on port B.
To use them as # 30 and # 17 you can follow the instructions I quote.
If you do modify your board and the recipe I found does not work, come back and say, there are a few other ways to get at the pins but none with the same convenience as having them show up as Arduino numbering scheme pins.
Good luck with the pesky soldering… you do know there are boards with more i/o pins already, right?
The first thing I would do is get the LEDs to work, if you cannot then you cannot access them. Then with a multimeter measure the voltage on the pins when on and off. You should get about zero and VCC, if you get about 2 volts or less you are on the wrong side of the resistor. If the pins are to be outputs you are set, just do not push much of a load on them. If inputs ;you may have to remove the resistors. Post an annotated schematic of what you want to do. Frizzies are not schematics.
@alto777
I haven't done the modification to Arduino Pro Micro yet. I know there are boards with more I/O but I have a project based on ProMicro already made and I needed to expand a functionality by adding 2 remote buttons.
@gilshultz
I will also try this as soon as possible, I found some useful information here (Pro Micro & Fio V3 Hookup Guide - SparkFun Learn)
It seems easy to be able to make a hook of pin 17, more complex that of pin 30 always according to what is written in the article...
Yes @TomGeorge,
I'm using all the pin. My first project was based on Arduino Mega, now I'm using Serial Led controller WS2811 so I reduce the number of pin used by led feedback and I'm using native midi port without serial to midi conversion.
Dear All
thanks. I removed the resistors and soldered two wires to the pads. Everything works great!
I leave below an example code. I have a standard test pin to check function and the two are soldered.
With button not pressed I read 1, when I press 0.
Unfortunately bad news. As written by @sterretje Arduino actually interacts with those pins even though they have been initialized as Output. The blink leds conflict with the button pressure reading... I don't know if it's going to be as simple as I imagined it
@alto777
Exactly. I thought that setting the pin as Input this behavior would not occur. It is also written in solution 1 of StackExchange, but I use Input_pullup and perhaps this leads to the manifestation of the problem.
Anyway modifying pins_arduino.h (solution 2) everything seems to work correctly.
FYI with Arduino IDE 2 the pins_arduino.h is located on windows in C:\Users[USERNAME]\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\leonardo\
@kolaha
I don't have many skills on low level arduino. I'm sure wiping the bootloader and using the ISP programmer will solve the problem, but I'm not able to implement this solution. I found StackExchange's solution 2 more comfortable.