2. Setting up the Pi
6. USB TO POWER
SOURCE
5. TO MONITOR
4. TO MOUSE
3. TO
KEYBOARD
2. WI-FI
ADAPTER
1. SD CARD
3. Operating Systems for Pi
• Raspbian (Jessie, Jessie lite)
• Ubuntu (Snappy Ubuntu Core)
• Fedora
• Debian
• Archlinux ARM
• Windows 10 IoT Core
• Kali Linux
• OpenELEC
• RetroPIe
4. Preparing the SD card with an OS
• Step 1: Download bootable disk .iso's (raspbian jessie)
• Link:https://www.raspberrypi.org/downloads/raspbian
• Step 2: Write iso image to SD card
• For Windows/Mac/Linux
https://www.balena.io/etcher/
5. Let's boot it up!!!
• Plug in all the accessories
• Plug in the power cable
• Pi will start booting
automatically
(First boot may take a long
time)
• You may have to face a
configure window
(If it happens, follow it
through)
6. Default Credentials for a new user
• If you encounter for a
username and password:
• username: pi
• password: raspberry
• After login, type 'startx' to go to
the Desktop
11. Do a system update
(It is important to function all the
apps working correctly)
• Open up the terminal:
• Write--> sudo apt-get update
• and--> sudo apt-get upgrade
** Reboot after completing the update process and we are
good to go!!! :D
13. GPIO on Raspberry Pi
• 26 GPIO Header in Model A/B and 40 GPIO Header in Model B
• These pins are a physical interface between the Pi and the
outside world.
• Out of 26, 8 are dedicated IO Lines, 2 are for UART, 4 are for
SPI (+1 for Another Chip Select) , and another 2 for the I2C
Interface (Total 17 out of 26)
• Rest are Supply Rails.
• Model B+ has 9 additional GPIO including a extra SPI (Total 17
+ 9 = 26 out of 40)
• WiringPi : Easy to use C Library for accessing the GPIO Lines
via Programming (Arduino Style Programming)
14. Let's Do Blinky!!!
Making of a LED Blinker using Python
==> What you will need:
-> A raspberry pi
-> A LED
-> A 330Ω resistor to protect the LED
-> Jumper wires
15. Let's Do Blinky!!!
Step 1: Make sure if the LED is
okay
• Connect the jumper wires as
shown
• One wire on the short leg of
LED (Negative)
• Another one attached with the
resistor is
on the long leg (Positive)
LED
16. Let's Do Blinky!!!
Step 1: Make sure if the LED
is okay
• Connect the wires as shown
• One in the 3.3V pin (Positive
wire)
• Another one is in GND
** Check if the LED is on!
3.3V (Pin
1)
GND
Cathode
Anode
(longer leg)
19. 5 functions to control GPIO’s
• GPIO.setmode()
• GPIO.setwarnings()
• GPIO.setup()
• GPIO.input()
• GPIO.output()
20. Let's Do Blinky!!!
->Programming the LED
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
LED = 4
GPIO.setup(LED,GPIO.OUT)
while True:
GPIO.output(LED,True)
time.sleep(1)
GPIO.output(LED,False)
time.sleep(1)
import RPi.GPIO libs
set LED pin as output
toggle light pin signal to
low/high to make it blink.
set pin type. use BCM, not pin
number
GPIO 4 pin (Pin 7)