> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deneyapkart.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Pin Definitions (DYv2)

## Power Pins

* **5V –>** Provides 5V voltage and 0.5A current output capacity via a DC-DC step-up converter. It provides output when either power input (USB or Li-Po battery) is connected. It can be used to power external units.
* **3V3 –>** Provides 3.3V voltage and 1A current output capacity via a DC-DC step-down converter. It provides output when either power input (USB or Li-Po battery) is connected. It can be used to power external units.
* **VBAT –>** Outputs the voltage of the externally connected Li-Po battery (3.3V – 4.2V). It can be used to power external units.
* **GND –>** The common ground line of the circuit for all power and logic connection pins.

## Logic Pins (Input/Output Pins)

* **D0 – D15 –>** Used as digital input-output pins. **Logic "0" corresponds to 0V; logic "1" corresponds to 3.3V**.
* **A0(D23), A1(D22), A2(D21), A3(D20), A4(D19), A5(D18), A6(D17), A7(D16)** pins can also be used as digital input-output pins.
* All of these pins can be used as PWM pins due to the ESP32-S3 architecture.
* Pins are **not** 5V tolerant. (Voltages above 3.3V should not be applied).

## Analog Pins

* **A0 – A7 –>** Used as input pins for analog signals (ADC) in the 0V – 3.3V range. All of these pins can also be used as digital input/output pins.
* **D15(A8), D14(A9), D13(A10), D12(A11), D1(A12), D0(A13)** pins can also be used as analog input pins.

## Communication Pins

* **TX – RX –>** Serial communication (UART) pins. Firmware uploading and terminal communication are provided via these pins. **TX** is the output; **RX** is the input pin. They can also be used as digital input-output pins besides UART communication. They are also named as **D2(TX)** and **D3(RX)**.
* **I2C –>** Any sensor or actuator can be controlled via **SDA** and **SCL** pins. **SDA (both input and output)** is the data line; **SCL (output)** is the clock synchronization pin. These pins are held at the **logic "1" (3.3V)** level with 10K pull-up resistors. They can also be used as digital input-output pins besides I2C communication. They are also connected to **D10(SDA)** and **D11(SCL)** pins.
* **SPI –>** Any sensor or actuator can be controlled via **MOSI, MISO, SCLK**, and **SS** pins. **MOSI (output)** is the data pin, **MISO (input)** is the data pin, **SCLK (output)** is the clock synchronization pin, and **SS** is the passive device selection pin. These pins can also be used as digital input-output pins. They are also named as **SS (D4), SCLK (D5), MISO (D6), and MOSI (D7)**.

## PWM Pins

* Thanks to the ESP32-S3 architecture, almost all general-purpose input/output (GPIO) pins can be used as Pulse Width Modulation (PWM) outputs. You can assign any data pin as PWM for operations like motor drivers, LED brightness, etc.

## Camera Pins

Dedicated data and synchronization pins for the camera module:

* **CAMD2 - CAMD9 –>** Pins where image data (pixel) is transferred. Connected to **D5, D1, D0, D4, D6, D8, A6(D17)**, and **A4(D19)** pins respectively.
* **CAMSD – CAMSC –>** Camera I2C control pins. **CAMSD (A0/D23)** is data, **CAMSC (A1/D22)** is the clock pin.
* **CAMV –>** Image ready (VSYNC) indicator. Connected to the **A2(D21)** pin.
* **CAMH –>** Horizontal reference (HREF) indicator. Connected to the **A3(D20)** pin.
* **CAMXC –>** Camera main clock signal input (XCLK). Connected to the **A5(D18)** pin.
* **CAMPC –>** Pixel clock signal output (PCLK). Connected to the **D7** pin.

## Capacitive Touch Pins

* **T0 – T10 –>** Input pins used for touch (capacitive) sensing.
* Connected to **T0(A0), T1(A1), T2(A2), T3(A3), T4(D15), T5(D14), T6(D13), T7(D12), T8(D1), T9(D0)**, and **T10(BAT)** pins respectively.

## RGB Pin

* **RGBLED –>** The pin to which the onboard addressable RGB LED is connected. It is internally connected to the **D24 (GPIO46)** pin on the board.

## Button Pin

* **GPKEY –>** The pin to which the general-purpose onboard button (BUT) is connected. It is also used to put the system into manual boot mode (BOOT). It is internally connected to the **D25 (GPIO0)** pin on the board.

## SD Card Pins

* Pins reserved within the board to communicate with the onboard Micro SD card reader:
  * **SDCM –>** D27 (GPIO12)
  * **SDCK –>** D28 (GPIO13)
  * **SDDA –>** D29 (GPIO14)

> **⚠️ Important:** External connections **cannot** be made from the outside to these three pins (D27, D28, D29) reserved for the SD card.

## Programming Pins

* **EN –>** To allow the ESP32-S3-WROOM-1 processor module to operate, this pin must be held at a logic "1" (3.3V) level. The **"RESET"** button is connected to this pin and is used to reset the system.
* **BOOT –>** Used to put the system into programming/boot mode. This operation is performed with the onboard "BUTTON" via the **GPKEY (D25 / GPIO0)** pin.

## Battery Voltage Measurement Pin

* **BAT –>** Used to measure the voltage value of a battery connected to the Li-Po battery connector or the VBAT pin analogically. It is connected to the **D26 (GPIO3 / A14 / T10)** pin on the board.
