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 |
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 |
| #define BUZZER_PIN 17 |
Buzzer control pin (GPIO 17)
| #define DEFAULT_I2C_SCL_PIN 13 |
I²C clock pin (SCL)
| #define DEFAULT_I2C_SDA_PIN 12 |
I²C data pin (SDA)
| #define HDC2021_INTERRUPT 21 |
Temperature & humidity sensor interrupt pin (GPIO 21)
Temperature & humidity sensor interrupt pin
| #define HDC2021_INTERRUPT 21 |
Temperature & humidity sensor interrupt pin (GPIO 21)
Temperature & humidity sensor interrupt pin
| #define ICM42670_INT 6 |
IMU interrupt pin
| #define PDM_CLK 15 |
Microphone clock output (GPIO 15)
| #define PDM_DATA 16 |
Microphone data input (GPIO 16)
| #define RED_LED_PIN 14 |
Onboard red LED pin (GPIO 14)
| #define RGB_LED_B 20 |
RGB LED blue channel (GPIO 20)
| #define RGB_LED_G 19 |
RGB LED green channel (GPIO 19)
| #define RGB_LED_R 18 |
RGB LED red channel (GPIO 18)
| #define SW1_PIN 2 |
SW1 button pin (GPIO 2)
| #define SW2_PIN 22 |
SW2 button pin (GPIO 22)
| #define VEML6030_INTERRUPT 9 |
Ambient light sensor interrupt pin