For those using the Nordic nRF52 eval boards for MicroPython development, you might be interested in freeing the GPIO pins consumed by the Buttons/LEDs. This can be accomplished by shorting the pin 5 (SHIELD_DETECT) of the ICSP header to ground.
This shorting will free the Button/LED GPIOs, but result in the lost of direct access to the Buttons/LEDs.
Access to the Buttons/LEDs can be accomplished though the on-board IOExpander (PCAL6408A, U7).
The link below provides a simple template module which shows how to program the IOExpander to preform IO operations as well as pass in interrupts. https://github.com/foldedtoad/more_py_p ... ioexpander
The README.md file has more details
[nRF52] Button/LED support though IOExpander on PCA10040 and PCA10056 boards
- FoldedToad
- Posts: 8
- Joined: Sat Feb 23, 2019 11:50 pm