Introduction To Raspberry Pi.
What is Raspberry Pi?
Raspberry pi is a small signal bored computer. By just adding keyboard, mouse and Raspberry pi .it will work as a small computer. In Raspberry pi it based Raspbian OS (Operating System). That official operation system available for free. It is based on GPU (Graphics Processing Unit) processor and it's programmable by python.
Specification :
- Broadcom processor -Bcm2837 (varies when model changes)
- ARM Quad Cortex - A53
- RAM-1GB
- Frequency-1.2GHZ
- Inbuilt wi-fi
- 4 Ports for USB 2.0 and their frequency range is 640 kbps
- The composite Video and Audio output port(3.5mm) carries video along with audio signal to the Audio/Video systems.
- HDMI (High-definition multimedia interface)-It is used for transmitting uncompressed video or digital audio data to the Computer Monitor, Digital TV, etc. Basically for display connection.
- Power led (PWR)- indicate the state of raspi. It is a RED coloured LED which is used for Power indication. This LED will turn ON when Power is connected to the Raspberry Pi. It is connected to 5V directly and will start blinking whenever the supply voltage drops below 4.63V.
- Active led(ACT)-Indicate the state of OS and Green LED which shows the SD card activity.
- Consists Of A 40-Pin GPIO.
- The Raspberry Pi 3B+ board contains a single 40-pin expansion header labeled as 'J8' providing access to 28 GPIO pins
- UART(Universal Asynchronous Receiver/Transmitter) Interface- UART is commonly used on the Pi as a convenient way to control it over the GPIO, or access the kernel boot messages from the serial console (enabled by default).
- These pins are a physical interface between the Pi and the outside world.
- Raspberry pi can control many external I/O devices using these GPIO’s.
- We can program these pins according to our needs to interact with external devices. For example, We can also configure any GPIO pin as an output to control LED ON/OFF.
Pin Numbering:
We should define GPIO pin which we want to use as an output or input. But Raspberry Pi has two ways of defining pin number which are as follows:
- GPIO Numbering
- Physical Numbering(bcm)
In Raspberry Pi, BCM (Broadcom SOC channel) pins refer to the numbering system that identifies GPIO pins based on the Broadcom chip's internal configuration, rather than their physical location on the board.This means that each GPIO pin is assigned a specific BCM number that corresponds to its function on the chip.
Function used in Raspberry pi :-
1)setmode():-
Used To Set The Mode Of Pins.
There Are two modes :-BOARD/BCM
In BCM,
GPIO.setmode(GPIO.BCM)
In BOARD,
GPIO.setmode(GPIO.BOARD)
2)setup() :
Used To Configure Pin As I/P Or O/P .
E.g: GPIO.setup(8, GPIO.OUT)
3)output():
Used To Write Value On Pin.
Value-True/False
E.g: GPIO.output(8, True)
4)input():
Used To Read The Value Of Pin
Linux Commands used in Raspberry pi :-
- pwd -present working directory .
- cd -change directory. e.g -cd Desktop .
- ls -list
- sudo mkdir folder_name (To create folder )
- sudo nano file_name.py
- ctrl + o and Enter (to save file )
- sudo python file_name.py (To run the code)
- ctrl + z (To stop the execution )


0 Comments