I am trying to figure out how the GPIO for Arduino is defined, because the micro has ports A, B, etc, and every port has its own number. Somewhere this translation is done to enable us to use decimal values.
The serial port works fine via the virtual port, thus I assume the old dev kit is still OK, the LEDs do have a supply, but the MCU never turns output low to shine a LED.
I using the old Nordic Dev Kit. “Ini” file looks like this
[env:nrf52840_dk]
;platform = nordicnrf52
platform = https://github.com/platformio/platform-nordicnrf52.git
framework = arduino
board = nrf52840_dk
build_flags = -D NRF52840_DK ; another try
; build_flags = -D LED_BLINK=13 ; Tried a few thumb sucks
- How do I convert P0.13, P1.09 for instance to a number?
- Can special Ports like I2C, SPI, etc, can I used the above number at instantiation?
- Analogue port numbering scheme, can that also use the above number?
I need to make up my own ‘board’ for my custom design.
NS I looks at variant.c but it does not define all the ports, and even If I used this translation it still does not work. (g_ADigitalPinMap)
Example : P0.13 => 13,