1.
40-Pin GPIO (General Purpose Input/Output) Header
This is the primary interface for connecting to external hardware.
Key Features:
● Total Pins: 40 (26 GPIO + 14 power/ground/special)
● Voltage Levels: 3.3V logic (not 5V tolerant!)
● Configurable: As input/output
● Alternate functions: SPI, I2C, UART, PWM, etc.
2. I2C (Inter-Integrated Circuit)
● Pins Used: GPIO 2 (SDA), GPIO 3 (SCL)
● Purpose: Communicate with multiple peripherals (e.g., sensors, EEPROMs)
● Bus Speed: Standard mode (100 kbps), Fast mode (400 kbps), etc.
3. SPI (Serial Peripheral Interface)
● Pins Used:
○ GPIO 7 (CE1)
○ GPIO 8 (CE0)
○ GPIO 9 (MISO)
○ GPIO 10 (MOSI)
○ GPIO 11 (SCLK)
● Purpose: High-speed synchronous communication (e.g., with displays, ADCs)
4. UART (Universal Asynchronous Receiver/Transmitter)
● Pins Used:
○ GPIO 14 (TXD)
○ GPIO 15 (RXD)
● Purpose: Serial communication (e.g., with GPS, GSM modules)
5. PWM (Pulse Width Modulation)
● Pins Used: GPIO 12, 13, 18, 19 (configurable)
● Purpose: Control motor speed, LED brightness, etc.
6. Power Pins
● 5V Pins: Pin 2, Pin 4
● 3.3V Pin: Pin 1
● Ground (GND): Multiple pins: 6, 9, 14, 20, 25, 30, 34, 39
1. Digital I/O Pins (0 to 13)
● Pins: D0 to D13
● Voltage: 0V (LOW) or 5V (HIGH)
● Functions:
○ General purpose I/O
○ PWM on pins: 3, 5, 6, 9, 10, 11 (marked with ~)
○ Serial: D0 (RX), D1 (TX)
○ SPI: D10 (SS), D11 (MOSI), D12 (MISO), D13 (SCK)
○ LED: Pin 13 has onboard LED
🔹 2. Analog Input Pins (A0 to A5)
● Used to read analog voltage (0–5V)
● 10-bit ADC (Analog to Digital Converter)
● Can be used as digital pins (A0 = D14, etc.)
● A4 (SDA) and A5 (SCL) used for I2C
🔹 3. Power Pins
● 3.3V: Power output for low-voltage devices
● 5V: Main 5V power output
● GND: Ground (multiple)
● VIN: Input voltage from external source (7–12V)
🔹 4. Communication Interfaces
✅ UART (Serial Communication)
● D0 (RX) and D1 (TX)
● Used for serial communication with PC via USB
✅ SPI (Serial Peripheral Interface)
● D10 (SS), D11 (MOSI), D12 (MISO), D13 (SCK)
✅ I2C (Two-Wire Interface)
● A4 (SDA) and A5 (SCL)
🔹 5. Reset Pin
● RESET: Can be used to reset the board manually
● Can also be triggered via USB DTR signal