Вы находитесь на странице: 1из 12

IoT Enabled Smart Cart Prototype ( Step by Step Guide)

Introduction to Raspberry Pi Kit

Downloading Raspbian Jessie OS Image and Writing it into SD Card
Connecting Raspberry Pi Kit to Display
A python script to scan and read barcodes

Introduction to Raspberry Pi Kit

Downloading Raspbian Jessie OS Image and Writing it into SD Card

1. First we need to install Raspbian Jessie OS into our SD Card. Note that SD Card should
be minimum of 8 GB memory. Insert your SD Card in Card Reader and then connect this
card reader to your PC/laptops USB Port.
2. After the Card is read detected by your PC/Laptop, download the SD Associations
Formatting Tool from https://www.sdcard.org/downloads/formatter_4/eula_windows.
3. Install and run the Formatting Tool on your windows machine.
4. Set FORMAT SIZE ADJUSTMENT option to ON in the Options menu.
5. Check that the SD card you inserted matches the one selected by the Tool.
6. Click the Format button.
7. Download Raspbian Jessie With Desktop image from this url.
8. Download Win32DiskImager, unzip the downloaded file and run the utility file.

Url to download- http://sourceforge.net/projects/win32diskimager/

9. Select the Raspbian image file you downloaded in step 7.

10.Select the drive of your SD card in the Device dropdown. Make sure you chose

the correct one. Otherwise, you risk damaging the data on your hard drive.

11.Select Write and wait for the process to finish. Thats it!

12.Now you can plug the SD card into your Raspberry Pis slot. To do that extract sd

card from Card Reader and Insert it in Raspberry Pis SD Card slot ( Refer to

Picture 1, Slot 1).

Connecting Raspberry Pi Kit to Display

This step is very simple if you have TV/Monitor with HDMI port. Simply connect RPi (Raspberry
Pi)s HDMI port (Refer to Picture 1, Slot 2a) to TV/Monitors HDMI Port. Now you can connect
your TV/Monitor to power source and RPi to power using Micro Usb Power slot of RPi (Refer to
Picture 1 Slot 5).
Warning RPi doesnt come with power adapter, either you should buy compatible adapter or
you can use any generic USB mobile phone charger. Itll work. The only thing you should take
into consideration is adapters power ratings such as it shouldnt have output of more than 5V
otherwise Itll burn your RPi Kit. This is very important.

But if you dont have either the TV or Monitor to connect it with HDMI port, as it was in my case,
we can use make of laptops screen with a bit difficult process.
A curious question- We do have HDMI port in our laptops also. Why cant we connect RPis
HDMI port to HDMI port of laptop? This is because, HDMI port are of two types- Input and
To receive signals from RPi, our laptop should have HDMI-Input port (Represented as HDMI-I
port), but usually all laptops have HDMI output port not input port. This is the reason we cant
simply connect RPi with our laptop directly.

Please follow below instructions to connect RPi to your laptops display.

1. After setting up your SD Card, insert it into the Raspberry Pi. Next, connect your micro
USB cable to the Raspberry Pi to power it.
2. Also, connect your Raspberry Pi to the laptop via an ethernet cable.
3. Install Putty as per your Windows configuration of your laptop and via SSH you can
connect with your Raspberry Pi. URL to download-
4. Sharing Internet Over Ethernet
This step explains how you can share your laptop internet with the Raspberry Pi via
Ethernet cable.
In Windows: To share internet with multiple users over Ethernet, go to Network and
Sharing Center. Then click on the WiFi network:
Click on Properties (shown below), then go to Sharing and click on Allow other network
users to connect. Make sure that the networking connection is changed to Local Area
Note: Doing this will provide a dynamic IP to the Ethernet port on your laptop and other
devices connected to your laptop. Now, to check the IP assigned to your laptop, click on
the new local area connection link created:
As shown above, the IP assigned to my laptop is To check the IP
assigned to the connected ethernet device, do the following. Considering that the IP
assigned to your Laptop is and subnet mask is :
Open command prompt.
Ping the broadcast address of your IP. (Type) Eg: ping
Stop the ping after 5 seconds.
Check the reply from device: arp a
5. Download and Install Advanced IP Scanner using below url in your laptop-
6. Run Advanced IP Scanner and you will see the below window-

Click on Scan. (Please make sure your RPi is powered up and is connected to
laptop through ethernet cable.)
After the scanning you will see the list of all connected devices and their IPs as
shown in below image. Note Down the active( Active means with blue sign) RPis IP.

7. Now open the Putty software installed in Step 3. Use same IP address and Port as 22,
Connection type as SSH. and click on Open.
8. If you see a warning message as below click on Yes.
9. You will see login as option type pi (without quotes) hit enter key, then you will be asked for
password type raspberry(without quotes) and hit enter. (Please note that password is hidden it
doesnt seem that it is being typed).

10. After successful login, type below two commands

$ sudo apt-get update
$ sudo apt-get install tightvncserver
(Note- Type without $)
11. Itll install VNC Server to your RPi Kit
12. When installation is done, type below command and hit enter.

$ vncserver :1

13. You will be prompted to enter and confirm a password. This will be asked only once, during
first time setup. Enter an 8 digit password. Note that this is the password you will need to use to
connect to your Raspberry Pi remotely. You will also be asked if you want to create a separate
read-only password say no (n).

14. Itll run VNC Server in your Pi. Now lets configure VNC Server Client your laptop.

15. Download VNC client and install it. When you first run VNC viewer, you will see following:
Enter the IP address of your Raspberry Pi given dynamically by your laptop (you got the
address from the earlier step# 6) and append with :1 (denoting port number) and press connect.
You will get a warning message, press Continue:

Enter the 8 digit password which was entered in the VNC server installation on your Raspberry
Finally, the Raspberry Pi desktop should appear as a VNC window. You will be able to access
the GUI and do everything as if you were using the Pis keyboard, mouse, and monitor directly.
As with SSH, since this is working over your network, your Pi can be situated anywhere as long
as it is connected to your network.
Raspberry pi desktop on your laptop display

Похожие интересы