Description
First of all, thanks to all the contributors for this core, it's very helpful.
So I just finished spending the better part of my day figuring out how analog/digital pins in code (A1 or 1) map to the pin names on the datasheet (P0.##). I saw C:\...\arduino-nRF5\variants\nRF52DK\variant.h
contained definitions for how certain constants map to pin numbers, such as #define PIN_SERIAL_RX (24)
, but I'm not sure what (24)
refers to and learned it definitely wasn't P0.24.
I eventually found the GPIO Pin Mapping for the nRF52DK I'm using in the DK datasheet (attached below), and that cleared up all my confusion. Not sure if these mappings are specific to my module, I couldn't find anything clearer than "Section 4 Pin assignments" in the actual nRF52832 datasheet and while that has analog input mappings it omits digital pin mappings (e.g. D0 is mapped to P0.11).
How do most people learn about these pin mappings? If these pin mappings are consistent throughout most modules, could that be included in the readme? Or if not, perhaps something pointing people in the right direction for their specific module? I spent the longest time thinking my code wasn't uploading or somehow couldn't connect to the board.
Just hoping to help with the learning curve for future new users.