DEV Community

Sudarshan Kadam
Sudarshan Kadam

Posted on • Updated on

Everyone should get a Raspberry Pi!!

Raspberry... what?

If you don't know what a Raspberry Pi is, you should check it out. It's a single board computer barely bigger than a credit card in size. It can run many operating systems like Raspbian, Ubuntu and Windows 10 IoT core. To use this tiny computer, all you need is a micro SD card and a power supply. For most use cases you will never have to connect a keyboard or mouse to the pi. You can just set it up and access remotely from your personal computer. Raspberry Pis are a favorite tool of most DIY enthusiasts. Even if you don't plan to do any fancy DIY projects at home, you can still find some use for a Raspberry Pi.
Some notable examples: An ad blocker at router level, Minecraft server, Plex streaming station, self hosted cloud, temperature monitor, smart mirror and much more. More details on some of these projects later below.

This article was updated on 3-Jan-2020

Basic setup guide:

Hardware

  1. Buy a Raspberry Pi. Check here for retailers. Check your local stores like Fry's, Micro Center, Target and even some Walmart stores have it. There are multiple models of pi.

    • Raspberry Pi Zero W: A very tiny pi that costs $10. Best for light use.
    • Raspberry Pi 4 Model B: A very powerful latest version of pi. Comes in variants 1gb, 2gb and 4gb. Well suited for many home server applications. See below. Costs from $30 to $60 depending on model.
    • Raspberry Pi 3 Model B+: Previous pi model before they launched pi 4. If you can't get your hands on a model 4, go with 3B+. It still holds well for many applications. Should cost around $25-30 now.
  2. A micro SD card. This will be your main system disc. 16gb works fine but I recommend at least 32gb. The cards have gotten cheap so 32gb should cost like $6.49 here.

  3. A card reader/laptop with SD card reader. This is necessary to install operating system on the SD card. You can buy cards with pre-installed OS but what's the point of tinkering if you don't do it yourself?

  4. A power adapter. Depending on which Pi you have, you will either need a micro USB or a USB-C power source. Majority of Android phone chargers will do the job in a pinch but I recommend buying a proper power adapter. All the electronics stored mentioned above should have them along with Pi.

Base Software/OS setup

There are multiple linux distros available for Raspberry Pis. Most commonly used OS for a pi is Raspbian. It is developed by Raspberry Pi foundation and has most users. Installing this OS is actually very simple.

  1. Download the OS image. Raspbian can be downloaded from this page. Choose Rasbian Lite (no GUI, only base OS) if you plan to use the pi for non visual stuff. You never have to connect a monitor to pi unless your project needs a screen. So it's always a good idea to start with Raspbian lite.

  2. Windows users download one of these tools: Win32DiskImager, Rufus. These are used to install the OS image to your SD card.

  3. Plug in your micro SD card. Open Win32DiskImager. Select the OS image downloaded in step 1 above, make sure the drive selected by the tool is the SD card. Hit 'Write', accept warnings and stuff. Takes around a minute or so to write the SD card.

  4. VERY IMPORTANT DON'T SKIP THIS STEP
    Detailed instructions here. Quick version:
    On your desktop, create following files.

    • An empty file named 'ssh' without any extension. Not even txt.
    • Another file named wpa_supplicant.conf and paste following in the file (update your wifi network name and password of course):
     country=US
     ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
     update_config=1
    
     network={
         ssid="NETWORK-NAME"
         psk="NETWORK-PASSWORD"
     }
    
  5. Now remove the car from your computer, put it in the pi. Connect the pi to the power supply. Give it a minute to boot for first time. Find out what IP got assigned to the PI using your router interface. If all goes well, you will see the pi connected to your wifi. Now you can SSH into the pi. Windows 10 has now built in SSH so you don't need any external tools.
    Just open cmd and type ssh pi@<<ip-address>>. Default username for Raspberry pi is pi and password is raspberry. Change the password once you login.

Some projects

Now we have it up and running, here are few projects you can do with your Raspberry pi:

  • Run a PiHole ad blocker for your network
    This is first project I did with a Raspberry pi zero. PiHole If you live near a micro center, you can get a PI Zero W (wifi version) for $10 ($5 when on sale).

  • A Plex media server: Attach a USB drive filled with your movies, photos and videos to the pi. Make it auto-mount. Install Plex media server and now you can cast your own library of movies to your TV using Plex mobile app. It's like having your own Netflix. It has features like automatic subtitle downloads, remote access from outside your home etc.

  • Host a website: There are many tutorials online about how to host a website on your pi. Though it is always better to just get a commercial server package than self hosting a website. But you can always just use Pi as your testing server.

  • Smart Mirror: A digital overlay on a mirror that shows you weather, news and your meetings etc. If you check Raspberry Pi subreddit or Pi projects subreddit, you will see someone posting a Smart Mirror build every week.

  • A Minecraft server if you are into that sort of thing.

  • Personal Cloud: You will need to research this a bit. There are many open source and free personal cloud distros available. OpenMediaVault works great on Raspberry Pi.

Oldest comments (3)

Collapse
 
ghost profile image
Ghost • Edited

I vouch for pi-hole, although I have it installed in a Beaglebone Black (it's like a RPi 1) I've used it for years. Besides being an ad-blocker, it can act as an intermediary DNS server, it has great log and monitoring capabilities, all in a nice web interface; you can blacklist entire sites, nothing containing "facebook" goes into my network :) and unloads a lot of the overhead of local blockers/filters and does all for your whole network so: phones, tablets, etc. are immediately covered.

I haven't tried it for that but I bet is good too for parental control. And all this is, in my case, with a much slower HW than the available now.

A nice note is that RPi comes with a bunch of GPIO available, so you could add other functionalities involving physical devices like: LEDs, sirens, motors, etc. Besides the fact that is actually a computer so feel free to attach keyboards, mouse, screen, etc.

And is Open Source, which for me is a must for this kind of application.

Collapse
 
thesuda profile image
Sudarshan Kadam

Great points. I love pi-hole because it has actually saved me from my own stupidity many times. One time I was bored and browsing random stuff, ended up on a random sketchy website. But then pi-hole simply refused to serve the links I clicked. I hadn't realized that the links I originally clicked (and opened in a background tab) were redirected to somewhere even more fishy. If it wasn't for pi-hole stepping in, I am pretty sure I would have not noticed until it was too late.

Collapse
 
ghost profile image
Ghost

I also have this kind of HW as:

1) secondary backup, an easy to setup backup rig, just add an external USB drive or even a thumb drive large enough and you can have an extra backup little server.

2) secondary git server, every time I push to my local repo I also push it to my trusty RPi.

Keep in mind that this boards usually consume less than 10W (5V and at least the Beaglebone Black and RPi never eats more than 1A sustained) of course you have to add any extra peripherals.

And I haven't tried yet but you can also:

  • Download the whole or part of wikipedia and put it on a RPi so even if you get disconnected you at least will have wikipedia.

  • Use it as a cheap honeypot (if you don't know what it is you probably don't need it)

  • Give it to your tech interested kid, is cheap and works at 5V so s(he) is safe and can play with SW or HW with it, I would have love one when younger. And Linux have a lot of educational SW, from interactive periodic tables, drawing SW, math, astronomy SW, all needed for the homework.

  • Learn easily about networking and cluster computing, you can cheaply make a respectable network.

  • Emulate almost any old console, MAME, etc.

  • And of course you can use it as a fancy Arduino, that you can program easily with Python.

Sorry about the length of my posts but I got exited :D