Skip to content
July 28, 2015 / kiranpatils

Raspberry Pi Quick start guide

Howdy Friends – Sorry for being away since so long. But have been super busy with lot of things. And still lot of things going on. Unfortunately unable to find time to write a blog and share knowledge (I know you don’t find time. You have to allocate it. And yes — Somehow not able to allocate it.) But I’m sure soon will be able to share my learnings with you! And today’s blog would like to dedicate it to Sir Abdul Kalam. He has always been an inspiration for most of us! (Including me and you!). And when I read his following quote – I thought will work extra and get this blog out – Just for you Sir!

Kalam-Sir-Quote

What is Raspberry Pi? And what’s the usage of it?

If you haven’t heard about this then you need to come out of your cave. Because lot of techies are talking about this. Especially during March is for Makers movement. No worries — Will help you to understand it.

For Basics — Let’s talk to our friend wiki The Raspberry Pi is a series of credit card–sized single-board computers developed in the UK by the Raspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools.”

So, It’s a tiny computer for fun if you are techie and If you would like to inspire kids for learning programming, getting acquainted with computers and start thinking about using Technology to solve real world problems. This is a perfect start! I would strongly recommend you following links:

  1. https://www.raspberrypi.org/
  2. https://www.youtube.com/watch?v=uDCS45YntqI
  3. http://www.hanselman.com/blog/ManyRaspberryPiProjectsHowCanYouNotLoveATinyComputer.aspx
  4. http://www.hanselman.com/blog/Top10RaspberryPiMythsAndTruths.aspx
  5. http://www.hanselman.com/blog/HowToRunASPNET5Beta3OrGoLangOnARaspberryPi2.aspx

Also, I see this device got lot of capabilities for Schools and Kids. Because every Kid will have TV at their home. And using Pi they can convert to computer in around 3-5 K (Pi, Wireless Keyboard, Dongle etc.) and they have a machine ready. On which:

  1. They can do programming!
  2. They can access FULL Internet! (Obviously will need Internet Connection) – Access educational material, explore the world!
  3. They can play games
  4. And you never know — Their might be future Bill Gates/Steve Jobs who might be think of great idea — Which might change the future!

I know I am very optimistic. But possibilities are immense! And If someone gets interest in Computers/anything at this age — Then they will surely do miracles!

It looks like, I’ve portrayed Pi as a Kids computer. But wait a minute. If you are not Kid then also this is super useful to solve some real world problems. Few examples:

  1. http://www.itpro.co.uk/mobile/21862/raspberry-pi-top-15-projects-to-try-yourself
  2. http://www.pcworld.com/article/2895874/10-insanely-innovative-incredibly-cool-raspberry-pi-projects.html
  3. http://readwrite.com/2014/01/21/raspberry-pi-great-projects
  4. https://www.youtube.com/watch?v=ZszlVVY1LXo

Sounds interesting?! Eager to get your hands on it! That sounds good!

How to get it?

You can buy it from Raspberry Pi distributors : https://www.raspberrypi.org/products/

While I am writing. Current latest model is : https://www.raspberrypi.org/products/raspberry-pi-2-model-b/

You can also order it from Amazon. I’ve ordered this one : http://www.amazon.com/dp/B008XVAVAW/ref=wl_it_dp_o_pC_nS_ttl?_encoding=UTF8&colid=1LNNW3EMN1G6Z&coliid=I1XQEDLACW1CNU&psc=1 (Yes, It is from Amazon.com — During my U.S. Visit — I got it – Thanks to Nathan Miller — My colleague for helping me to get ordered it using his Amazon account]

This one is complete Ultimate Starter Kit. It is not required to order complete Starter kit. You can order stuff what yo really need. But If you ask me – I would suggest ordering complete Starter kit — Because it contains everything at once! And things become really easy! But again, this suggestion doesn’t apply to you. If you have budget constraints.

And thanks to CanaKit folks. Everything was perfect! http://www.canakit.com/raspberry-pi-starter-ultimate-kit.html

 

The kit also includes a 2.5A / 5V USB power supply specially designed and tested for the power-hungry Raspberry Pi 2. The included 2.5A adapter comes with a 5-foot cable and can power the Pi2 and other USB accessories (such as most portable hard drives) without requiring an external powered USB hub.

Kit Includes:

1 x Raspberry Pi2 Model B 1GB
1 x 8 GB MicroSD Card – Raspberry Pi Recommended MicroSD Card with the new NOOBS
1 x Raspberry Pi 2 Case
1 x CanaKit 2.5A MicroUSB Power Supply specially designed for the Raspberry Pi 2 (5-foot cable)
1 x Premium Quality HDMI Cable (6-foot)
1 x WiFi Adapter/Dongle (Ralink RT5370 chipset)
1 x Set of Heat Sinks
1 x Breadboard
1 x 40-pin GPIO Ribbon Cable
1 x 40-pin T-Shaped GPIO to Breadboard Interface Board
2 x Push Button Switches
1 x RGB LED
2 x Red LEDs
2 x Green LEDs
2 x Yellow LEDs
2 x Blue LEDs
10 x 180 Ohm Resistors
5 x 10K Ohm Resistors
1 x CanaKit General Guide for Beginners to Electronic Components

So, go ahead and order one — right now! You already have it — Perfect! Then let’s see next section!

I have got it – Now what?

  1. Unpacking : Unpacking is very easy. And you can find a lot of online tutorials for it.
  2. Installation and Configuration : If you’ve ordered complete kit — Then you will have one Micro SD Card with NOOBS [New Out of Box Software] on it. If not then you can follow this instruction to install NOOBS on your card :  https://www.raspberrypi.org/help/noobs-setup/ — Just follow the instructions. You will have your Pi up and running! [I was not lucky, my initial journey was bit bumpy. I spent the couple of days starting my Pi. But I think during that journey. I learnt a lot more about it. Please refer “Few Challenges” section for more info] This is also good : http://www.canakit.com/Media/CanaKit-Raspberry-Pi-Quick-Start-Guide-1.0.pdf
  3. Few commands : Make sure you read these links and run these commands : https://www.raspberrypi.org/documentation/raspbian/updating.md
  4. How to configure WIFI? : In case you have configured WIFI in your laptop and forgot password of it. Then you can use this link to get it : https://4sysops.com/archives/how-to-find-the-wifi-password-in-windows-8-1/ then these links helped me to configure WIFI :  https://www.maketecheasier.com/setup-wifi-on-raspberry-pi/ https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
  5. How to enable Remote Desktop? : Using this link you can configure Remote Desktop for your Pi : http://www.raspberrypiblog.com/2012/10/how-to-setup-remote-desktop-from.htmlWhich means you can disconnect your Pi from Monitor and can access it using your laptop or machine!

What was my First Project?

As you know in programming world. When you start learning any new language you start with “Hello World”! In Maker’s world it is Starting an LED using your python script — Trust me when you start LED — That feeling is just awesome! To do that, I followed this article :

http://www.thirdeyevis.com/pi-page-2.php

Make sure you follow first step and your LED should light up without any program — If it is not lighting up. Which means your connection is not perfect

 

IMG_20150729_240731745

Pi Connected with Breadboard and LED light up!

 

Pi GPIO Header Quick Reference

Now, Let’s do it programmatically!

  1. connect your one cable to – GPIO 27 and another one to Any Ground
  2. Make sure you’ve setup your circuit as per schematic mentioned in an article
  3. Make sure you’ve opened Python IDE using terminal as mentioned in an article
  4. Your code should look like this:
import RPi.GPIO as GPIO ##Import GPIO Library
GPIO.setmode(GPIO.BOARD) ##Use board pin numbering
GPIO.setup(13,GPIO.OUT) ## Setup GPIO on Pin13 to out
GPIO.output(13,True) ##Turn on GPIO pin 13

Run it, and your LED should light up!

 

After that, I wanted to ON/OFF this LED using my mobile! — And we did that using Flask – Flask is a microframework for Python based on Werkzeug, Jinja 2 and good intentions. Basically it is a web server — Which is easy to set up and run! – Trust me — Super easy! — Once we started web server — Then it was very easy to get it done. And then connected my mobile in same WIFI — And accessed URL. Using which I can start LED ON/OFF from my phone!

Few things to keep in mind:

  1. Make sure you connect your board correctly. Basically all pins should be touching the bottom portion of breadboard. Good read : https://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/robot/breadboard/
  2. When you connect your GPIO Ribbon cable make sure RED line is at right side — Or at First GPIO
  3. Understand GPIO numbers — http://www.raspberrypi-spy.co.uk/2012/06/simple-guide-to-the-rpi-gpio-header-and-pins/ — It will save a lot of your time!

Few challenges:

When I was configuring Pi with my old monitor [VGA to HDMI Converter], PS2 Mouse and Keyboard [PS2 to USB Converter]. I was getting following error:

Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(179,2)

Referred all above blogs. But nothing worked. But after changing it to new monitor with HDMI Cable and new Wireless USB Keyboard and Mouse — It started working! So, I am sure it was hardware failure!

References:

I hope this article helped you to understand Basics of Pi and inspired you to get your hands on it! This is just begining — Lot of things can be done using this. And it will be done in upcoming days — Just need to find sometime!

Special Thanks to Daniel – For helping me understand all the basics!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: