row-she ! So connecting pin34 (P2.34) on the bela mini via button to ground would
have exactly the same functionality as the on-board button, right?
Here's the schematic: use a 100ohm resistor to connect it to ground
You
row-she .. if I wanted to do the same to the on-board LED (connect an
external LED), would I simply connect the anode(+) to P1.2 and the cathode(-) to P1.4 ?
You would be competing the GPIOs being set as an output, so you may end up putting excessive stress on them. I'd suggest you set them to inputs instead. You would have to change in PRU.cpp
line 322
gpio_set_dir(belaMiniLedBlue, OUTPUT_PIN);
and line 410
underrunLed.open(belaMiniLedRed, OUTPUT);
to use INPUT_PIN
and INPUT
, respectively.
Either way, make sure the voltage you supply at the pin is never above 3.3V.
Last, why do you need to control these LEDs from an external piece of hardware? The are fully programmable via software.