Raspberry Pi
Raspberry Pi
The Raspberry Pi 4 has a 40-pin GPIO header that provides access to various General Purpose Input/Output
(GPIO) pins for interfacing with sensors, actuators, and other electronics. These pins are used for digital
input/output, power, ground, and specific functionalities like serial communication (UART), pulse-width
modulation (PWM), and more.
Pin layout same for raspberry pi5
Power Pins:
Pin 1 (3.3V): Provides 3.3V of power.
Pin 2 (5V): Provides 5V of power.
Pin 4 (5V): Another 5V pin.
Pin 17 (3.3V): Another 3.3V pin.
Ground Pins (GND):
Pin 6, 9, 14, 20, 25, 30, 34, 39: Ground connections for common ground to complete electrical circuits.
I2C Pins:
Pin 3 (GPIO 2 / SDA): I2C Data line (Serial Data).
Pin 5 (GPIO 3 / SCL): I2C Clock line (Serial Clock).
UART Pins (Serial Communication):
Pin 8 (GPIO 14 / TXD): UART Transmit (used for transmitting data).
Pin 10 (GPIO 15 / RXD): UART Receive (used for receiving data).
SPI Pins:
Pin 19 (GPIO 10 / MOSI): SPI Master Out Slave In (Data from Pi to peripheral).
Pin 21 (GPIO 9 / MISO): SPI Master In Slave Out (Data from peripheral to Pi).
Pin 23 (GPIO 11 / SCLK): SPI Clock.
Pin 24 (GPIO 8 / CE0): SPI Chip Enable 0.
Pin 26 (GPIO 7 / CE1): SPI Chip Enable 1.
PWM Pins (Pulse Width Modulation):
Pin 12 (GPIO 18): PWM output (can be used for controlling motor speed, dimming lights, etc.).
Pin 32 (GPIO 12): Another PWM pin.
Pin 33 (GPIO 13): Another PWM pin.
GPIO Pins (General Purpose Input/Output):
The remaining pins (like GPIO 4, 17, 27, 22, 23, 24, 25, etc.) can be configured as digital input or output
pins for general purposes, such as controlling LEDs, buttons, relays, etc.
Other Special Functions:
Pin 27 (GPIO 0 / ID_SD): I2C ID EEPROM (used for identifying the board in some cases).
Pin 28 (GPIO 1 / ID_SC): I2C ID Clock.
nn
Raspberry pi5 details
processor:
Quad-core Arm Cortex-A76 processor running at 2.4GHz
800 MHz VideoCore VII GPU
Memory:
8GB of LPDDR4X RAM (4267 MHz)
Storage:
Micro SD card slot (SDR104 compatible)
M.2 NVMe SSD slot (via M.2 HAT)
Connectivity:
Gigabit Ethernet
Dual-band 802.11ac Wi-Fi
Bluetooth 5.0
PCIe 2.0 x1 interface (requires HAT)
2 x USB 3.0 ports
2 x USB 2.0 ports
40-pin GPIO header
Dual 4-lane MIPI CSI/DSI transceivers (for cameras and displays)
Real-time clock (RTC)
Power:
5V DC via USB-C power supply (5V/5A recommended)
PoE HAT support
Other features:
On/off button
Fan connector
UART connector
CODES
1. Directory:
Where you are- pwd (print working directory)
- Change directory: cd/<name>
- Cd~ :go back to the previous one
- Ls :list content of the directory
- Mkdir :making our own directory
- Cd../… : going reverse
- Creating file nano <name.py>
- Running code pyhon temp.py
- Getting things from web: wget link copy paste , ls
- Rmdir removing directory
-