Hello,
I am trying to work on a simple GPIO program for the Thingy:91 which involves reading a pin for sensor inputs (this will be 2 sensors eventually). I have tried to look through the documentation in the infocenter and I believe that the way to do this would be to use the P6 spare GPIO of the nrf52480 (Nordic Semiconductor Infocenter table 4 pinout of connector P6).
My question is how to access these GPIO pins and set them as inputs/read from them, as I assumed that to reference P6.1 I would use the provided NRF_GPIO_PIN_MAP macro to reference Port 6, pin 1. This however seems to enable the green color of color sensor support LED, which is P0.1.
Could someone point me in the right direction/ explain how to access these P6 GPIO pins?
I've included the small code snippet as further info.
Thanks!
-Julian
#include <zephyr.h> #include <sys/printk.h> #include <hal/nrf_gpio.h> #define INPUT NRF_GPIO_PIN_MAP(6, 1) void main(void) { printk("Hello World! %s\n", CONFIG_BOARD); nrf_gpio_cfg_output(29); nrf_gpio_pin_write(29, 1); // sets red RGB LED high as expected nrf_gpio_cfg_output(13); nrf_gpio_pin_write(13, 1); // sets Test Point 32 high as expected nrf_gpio_cfg_output(INPUT); nrf_gpio_pin_write(INPUT, 1); // sets green color of color sensor support LED high? unexpected }