Arduino TKJHAT
Arduino library for Pico HAT extension board
Loading...
Searching...
No Matches
Board and pin definitions

Default GPIO assignments for peripherals on the JTKJ HAT. More...

I²C Bus (default)

I2C bus pins.

#define DEFAULT_I2C_SDA_PIN   12
#define DEFAULT_I2C_SCL_PIN   13

Interrupts from Sensors

#define HDC2021_INTERRUPT   21
#define HDC2021_INTERRUPT   21
#define VEML6030_INTERRUPT   9
#define ICM42670_INT   6

Buttons / Switches

#define SW1_PIN   2
#define SW2_PIN   22

LEDs

#define RED_LED_PIN   14

Buzzer

#define BUZZER_PIN   17

RGB LED (common-anode)

#define RGB_LED_R   18
#define RGB_LED_G   19
#define RGB_LED_B   20

PDM Microphone

#define PDM_DATA   16
#define PDM_CLK   15

Detailed Description

Default GPIO assignments for peripherals on the JTKJ HAT.

These macros define the GPIO pin numbers for peripherals and interfaces used by the SDK. They can be referenced directly or overridden at compile time if custom wiring is used.

Default pinout:

Function Macro GPIO Notes
I²C SDA DEFAULT_I2C_SDA_PIN 12 Default I²C data
I²C SCL DEFAULT_I2C_SCL_PIN 13 Default I²C clock
UART0 DEFAULT_UART_0 0 Primary UART port
UART1 DEFAULT_UART_1 1 Secondary UART port
SW1 SW1_PIN / BUTTON1 2 User button 1
SW2 SW2_PIN / BUTTON2 22 User button 2
Red LED RED_LED_PIN / LED1 14 Onboard LED
RGB LED R RGB_LED_R 18 RGB red channel
RGB LED G RGB_LED_G 19 RGB green channel
RGB LED B RGB_LED_B 20 RGB blue channel
Buzzer BUZZER_PIN 17 Active buzzer
PDM DATA PDM_DATA 16 Microphone data line
PDM CLK PDM_CLK 15 Microphone clock line
VEML6030 Interrupt VEML6030_INTERRUPT 9 Light sensor INT pin
HDC2021 Interrupt HDC2021_INTERRUPT 21 Temp/humidity INT pin
ICM42670 Interrupt ICM42670_INT 6 IMU INT1 pin
Note
These pin numbers correspond to the Raspberry Pi Pico GPIO numbers.

Macro Definition Documentation

◆ BUZZER_PIN

#define BUZZER_PIN   17

Buzzer control pin (GPIO 17)

◆ DEFAULT_I2C_SCL_PIN

#define DEFAULT_I2C_SCL_PIN   13

I²C clock pin (SCL)

◆ DEFAULT_I2C_SDA_PIN

#define DEFAULT_I2C_SDA_PIN   12

I²C data pin (SDA)

◆ HDC2021_INTERRUPT [1/2]

#define HDC2021_INTERRUPT   21

Temperature & humidity sensor interrupt pin (GPIO 21)

Temperature & humidity sensor interrupt pin

◆ HDC2021_INTERRUPT [2/2]

#define HDC2021_INTERRUPT   21

Temperature & humidity sensor interrupt pin (GPIO 21)

Temperature & humidity sensor interrupt pin

◆ ICM42670_INT

#define ICM42670_INT   6

IMU interrupt pin

◆ PDM_CLK

#define PDM_CLK   15

Microphone clock output (GPIO 15)

◆ PDM_DATA

#define PDM_DATA   16

Microphone data input (GPIO 16)

◆ RED_LED_PIN

#define RED_LED_PIN   14

Onboard red LED pin (GPIO 14)

◆ RGB_LED_B

#define RGB_LED_B   20

RGB LED blue channel (GPIO 20)

◆ RGB_LED_G

#define RGB_LED_G   19

RGB LED green channel (GPIO 19)

◆ RGB_LED_R

#define RGB_LED_R   18

RGB LED red channel (GPIO 18)

◆ SW1_PIN

#define SW1_PIN   2

SW1 button pin (GPIO 2)

◆ SW2_PIN

#define SW2_PIN   22

SW2 button pin (GPIO 22)

◆ VEML6030_INTERRUPT

#define VEML6030_INTERRUPT   9

Ambient light sensor interrupt pin