Here to learn, here to share.

Menu

Setting up my Raspberry Pi

Yesterday I got my new Raspberry Pi, which I ordered a couple of weeks back. Raspberry Pi, is a credit card sized computer which costs roughly $35, and runs on Linux operating systems. It cost me a total of INR 2400, and here is the link to book your device.

Since, I booked the device, I had been going through many videos to setup the R-Pi. One of the first things I did, was download the OS

I had an 8 GB Micro SD card to which I wrote the image using the Win32DiskImager. I had a spare SD card adapter, which I could use for the R-Pi.

The R-Pi is powered with a micro-usb charger. Anything that rates 5V, 750mA or above should do good. I used my Lumia phone charger to power it up. I have a very old and small tv which I rarely use, and was the only option for me (for first time setup). I used the AV cable which was connected between my Airtel DTH set-top-box and the TV, for connecting the R-Pi to the TV. I plugged in my USB keyboard and mouse, and connecting the power booted up the device automatically.

Unfortunately, the TV didn’t display any color. This is how it looked.

I hardly could read text from the TV screen. Until, I could go out and get myself a HDMI cable to plug into my LCD monitor, I decided to control the Pi using my laptop.

I needed a LAN cable for this, which I had earlier bought for playing multiplayer games between my desktop and laptop.

Before I actually connected the Pi to my laptop, I had to do quite a few things.

1. Update the raspbian distro (this was not really required) using the command

sudo apt-get update

2. Then I installed the VNC server, while I still had connection to the internet with TV being used as display. Command

sudo apt-get install tightvncserver

3. Set up a static IP address for the Pi. For this I had to make changes to the /etc/network/interfaces file, using the command

Then, came the actual connecting part. Connected the R-Pi with the laptop via the ethernet cable, and then ran the Advanced IP Scanner tool to make sure the R-Pi could be pinged from the laptop. Then downloaded PuTTY, and ran the tool. Entered the static IP address of the RPi, and connected to it, with the default credentials. (username pi, password raspberry), and voila, connected to my Pi.

But wait, I still haven’t done anything to get the desktop version (i.e GUI). This is when I needed to download the UltraVNC and install it on my laptop, to virtualize the GUI of the R-Pi.

Then used the Putty tool to start the vnc server on my R-Pi, using the command

sudo vncserver :1 -geometry 1366×768 -depth 16 -pixelformat rgb565

To automate this on startup of the raspberry pi, I did the following.

sudo nano /etc/init.d/tightvncserver (this creates a new file)

Pasted the following code

# First configure the user you want to run this under – this will generally be pi, unless you’ve created your own usersexport USER=’pi’

Now, I can open UltraVNC when the R-Pi is booted up and enter the IP address along with the display in the VNC Server field (in my case it would be 169.254.87.2:1). And it prompted me for the password, after which I could see my R-Pi desktop screen.

All this was the initial configuration so that I could connect to my R-Pi without having to connect it to the TV, and have a separate keyboard and mouse for it.

In the meanwhile, waiting for my USB Wi-Fi Dongle to make my R-Pi remotely available.

Planning for something interesting to do with the Pi. :) . Open for suggestions though.