setting-up-raspberry-pi2

Experimenting the Ape way: Setting up Raspberry Pi 2

Well, I have been working on different microcontrollers like 8051, Arduino Uno etc since quite a time. Recently, I got my hands on Raspberry Pi a SoC(System on Chip) which seems to be quite cool for people interested in DIY stuff. So, I decided to do some digging into the whole system before doing a blog post. Here, I am with a series of posts to entertain you with the hot trend in IoT a.k.a. Raspberry Pi. In this post, we will be setting up Raspberry Pi 2.

Let’s check the Specs!

  • A 900MHz quad-core ARM Cortex-A7 CPU
  • 1GB RAM
  • 4 USB ports
  • 40 GPIO pins
  • Full HDMI port
  • Ethernet port
  • Combined 3.5mm audio jack and composite video
  • Camera interface (CSI)
  • Display interface (DSI)
  • Micro SD card slot
  • VideoCore IV 3D graphics core

raspberry pi 2

Ain’t these specs cool, all in a small card sized chip!

Let’s Set it up!

Well, Raspberry Pi comes with a micro sd slot which gives an idea about how an OS(Operating System) will be running on it? No? Simple, the OS is flashed on to the sd card which can be inserted in any Raspberry Pi chipset and voila, you are up with an OS. Though, it’s up to you which OS you gonna use.

There are different OS varients ranging from open source Raspbian to Windows 10 IoT core which can be used to power up the Raspberry Pi machine. But if you want to run it on GUI, I would recommend Raspbian and for people who loves it the Headless way Windows 10 can be a good option too.

For first timers, you can follow up this quick starter guide by Raspberry Pi org to boot up the device in no time. Still I am writing up in short steps:

  1. Download the flash image for Raspbian OS from their website.
    1. For NOOBS, you can use simpler easy to use image i.e Noobs by them.
    2. For people who like a complete system like me can go for the latest build.
  2. Format the SD card and flash the image using following tools:
    1. For Windows users, you can use Win32 Disk Installer utility.
    2. For Mac lovers, we have the option to use an RPi Card Builder tool.
  3. When it is flashed, just insert the SD card into the RPi chip and boot up the device with a 5v power source.

Voila! We have an up and running movable OS for us!

SSH or GUI? Which one to choose?

Well, there is no correct answer to this as it is all about preferences. But for the first timers, I would suggest to go for a display like a Monitor or Adafruit LED touch screen one! Though, it is gonna shed some amount out of your pocket!

Or, you can go with the SSH (Secured Shell) like a pro! B|

Usually, SSH is enabled in a Raspbian OS but if it is not, connect your Rpi to a GUI and run raspi-config to start Raspberry Confirguration where you can enable SSH.

Here are some quick settings you can do while Raspberry Configuration settings page:

  1. Expand File system for the better management of the files in Raspberry Pi. But if you are a newbie, I would suggest not to change this setting.Raspberry-Pi2-Config-screen
  2. Go to Advanced settings(#8), and go to SSH(A4) and enable it!

Raspberry-Pi2-Advanced-Config-screen

As simple as that, and you can do SSH to Raspberry from your Bash Shell(Linux) or Terminal(Mac) or Putty(Windows). Command is simple and it is:

Usually ip address for the a local machine connected via ethernet in Mac OS is 192.168.2.2, but you can check that out by checking out in the Network Preferences option.

The default password for a flashed image is always raspberry. And Bam! You are in the Raspbian and can do anything you want to.

Tweaking the system! The Ape Way!

Well, that’s what we developers love? No? You will definitely when you find how awesome Raspberry Pi is! Let’s get to the business here!

First and the most important part is to the update and upgrade the system. This will update the system with latest libraries. Here’s the command you should run once you ssh into a raspberry pi:

Now, for our system to be kickass, we will be installing a few software below:

  1. Apache Http Server: Why not? It’s the basic! Don’t you think?
  2. Avahi Daemon: Nice tool for name resolution & for finding printers on a network.
  3. GNU C Compiler: gcc is a useful tool for us developers. For hobbyists, that’s your choice to install it or not.
  4. Curl: Tool for transferring data with URL syntax. Should be pre-installed but still just in case.
  5. GIT: Do I need to explain anything here? For us to push the code to GitHub repository.
  6. GZIP: Compression utility tool. Much needed for us I guess!
  7. NMAP: Network Mapper Tool for scanning ports and stuff.
  8. Tight VNC Server: A VNC tool to graphically connect to your system wirelessly.
  9. VIM: Need not say anything about the best editor for Linux.

Well, we can add N number of tools to the system but I have added those which are mostly used! But you can add SQL server and some other developer tools. That’s your choice!
We will cover up about installing tools which will be required for our further experiments with Raspberry Pi!

Did you like the post? Like and share it!

Any queries? Comment below, I will do my best to help you!