Raspberry Pi Setup Tutorial

Raspberry Pi is a single board computer(SBC) which have capabilities to work like a general Desktop/Laptop computer can do. Plus it can be use to play with a lot of peripherals like LED, sensors, motors, etc to make DIY projects using on board GPIO Pins. Overall you will have a great experience working with a Pi

  • OTHER ACCESSORIES NEEDED -
    SD card
    Compatible SD card.

Display
Along with monitor, keyboard and mouse are also needed.

Power Supply
Element14 & RS Components

Power supply also available at Amazon

You can also use a standard Powerbank to power a Raspberry pi.

HDMI cable
To connect Raspberry Pi to a HDMI monitor.

HDMI port on Raspberry Pi board -

HDMI to VGA adapter
To connect Raspberry Pi to a VGA monitor.

  • GETTING STARTED -
  • First of all you need an image of an operating system(OS) available for Raspberry Pi
  • You can either download Noobs (This is operating system installer for Raspberry Pi) or can download any operating system image available on the above link.
  • For beginners the recommended OS is Raspbian but you can download any os image you want.
  • After downloading the image you need to write that image on the SD card. For this you need 2 tools-
    SD card formatter
    Win32 diskimager
  • Now insert your SD card onto a computer on which you have downloaded above software and os image.
  • Format the SD card using SD card formatter. If you face any problem refer this link -
  • Write the image on SD card using win32 diskimager. Refer link 1, 2
  • After writing the image on SD card insert the SD card on Raspberry Pi SD card slot. Plug the monitor, mouse and keyboard to Raspberry Pi and power on the board.
  • Now the boot process will start.
  • When booting is completed login prompt will appear like this -

Type “pi” and press enter. Default password is “raspberry”. Then type “startx” to load the Graphics User Interface(GUI).

  • Now the GUI will load. To start with your new os you can open terminal by clicking on Menu>Accessories>Terminal. This window will appear -
  • Type in “sudo raspi-config”. (sudo is a command in linux which gives you superuser privilege which is needed sometimes for run some commands). This window will appear -
  • Select Expand Filesystem to expand the available free space on SD card. This is basically re-partitioning your SD card. When you write the OS image on your SD card a partition is created which can not be used until you re-partition it.
  • Select Change user password to change the password if you want.
  • Select Internationalisation options to set time zone, language, keyboard layout(Set keyboard layout to US English).
  • To connect to a network click on wifi icon on top right side of computer monitor screen.
  • Type in terminal “hostname -I” to check your network IP address.
  • To check available RAM go to Menu>Accessories>Task Manager.
  • Check available space. Type in terminal — “df -h”
  • To update system packages type in terminal “sudo apt-get update”
  • Upgrade os “sudo apt-get dist-upgrade”
  • Update firmware “sudo rpi-update”
  • Always remember to do updates on regular basis.
  • Change time zone — “dpkg-reconfigure tzdata”. Or to update date and time manually type — sudo date -s “Fri Feb 10 12:04 IST 2017” (This is for example. IST is Indian Standard Time. USe the time zone of your country in that place).
  • Shutdown type — “sudo halt”. Reboot — “sudo reboot”
  • Check os version — “cat /etc/os-release”
  • If there is an error in executing any command just type sudo before it.
  • Media player -
    Kodi — sudo apt-get install kodi
    VLC — sudo apt-get install vlc
    OMX player — sudo apt-get install omxplayer
  • Setting omxplayer as deafult -
    sudo apt-get install omxplayer
    sudo apt-get install xterm
    Right click on any video file > Open with… > Select “custom command line” > write the following command in box for “command line to execute” — xterm -fullscreen -fg black -bg black -e omxplayer -r %f
  • For any audio file just remove “fullscreen” from above command.
  • LEARNING PYTHON -
    Learn Python The Hard Way
    Head First Labs
    Head First
    YouTube
  • UNDERSTANDING GPIO PINS -

Raspberry Pi
Sparkfun
Makezine
Pinout

Type in terminal — “gpio readall” to show gpio pin configuration

Now basic setup for your Raspberry Pi is done. There are lots of software available in Raspbian pre-installed which you can use like Python, Scratch, Sonic Pi, Sense Hat emulator, Wolfram, Mathematica, few python based games pre-installed. So enjoy working with Pi. Hope this tutorial helps. For any further problem or problem related to this tutorial fell free to ask. Have a great experience.

RaspberryPiTutorials

Hacking the Physical World | Senior Embedded Systems Engineer @ PiRhoAlpha Research (ActiveBuildings) | I write posts about AVR and Raspberry Pi.