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
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:
- Download the flash image for Raspbian OS from their website.
- For NOOBS, you can use simpler easy to use image i.e Noobs by them.
- For people who like a complete system like me can go for the latest build.
- Format the SD card and flash the image using following tools:
- For Windows users, you can use Win32 Disk Installer utility.
- For Mac lovers, we have the option to use an RPi Card Builder tool.
- 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:
- 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.
- Go to Advanced settings(#8), and go to SSH(A4) and enable it!
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:
$ ssh pi@<ipaddress>
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:
$ sudo apt-get update && sudo apt-get upgrade -y
Now, for our system to be kickass, we will be installing a few software below:
- Apache Http Server: Why not? It’s the basic! Don’t you think?Shell1$ sudo apt-get install apache2
- Avahi Daemon: Nice tool for name resolution & for finding printers on a network.Shell1$ sudo apt-get install avahi-daemon
- GNU C Compiler: gcc is a useful tool for us developers. For hobbyists, that’s your choice to install it or not.Shell1$ sudo apt-get install gcc
- Curl: Tool for transferring data with URL syntax. Should be pre-installed but still just in case.Shell1$ sudo apt-get install curl
- GIT: Do I need to explain anything here? For us to push the code to GitHub repository.Shell1$ sudo apt-get install git
- GZIP: Compression utility tool. Much needed for us I guess!Shell1$ sudo apt-get install git
- NMAP: Network Mapper Tool for scanning ports and stuff.Shell1$ sudo apt-get install nmap
- Tight VNC Server: A VNC tool to graphically connect to your system wirelessly.Shell1$ sudo apt-get install tightvncserver
- VIM: Need not say anything about the best editor for Linux.Shell1$ sudo apt-get install vim
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!