DEV Community

Cover image for Preparing my Raspberry Pi
Anindita Basu
Anindita Basu

Posted on • Updated on

Preparing my Raspberry Pi

What is a RaMP stack, you might ask? It's my parody of the LAMP stack, where RaMP = RaspberryPi, MySQL, Python.

Why a RaMP stack? Because I am looking for a low-cost, low-space, low-weight alternative for my personal laptop, and because I want to keep the bot experiments completely separate from the stuff I have on either my work laptop or my personal laptop, and because, at some point of time, I dream of building my own Alexa-like voice bot...Also because I know basic Python and can pick up SQL.

Here's a picture to show you how tiny a barebones RaspberryPi can be.

These are my tentative steps:

  1. Set up my RaspberryPi.
  2. Design and create the databases.
  3. Design and create the bot app.

I am neither a geek nor a coder; this journey will not be easy. This post is the first of a series where I share my learning, failures, and successes with you all. In these posts, I plan to focus more on the design considerations (the WHYs) of the chatbot rather than the code aspects (the HOWs).

This post is about making a RaspberryPi ready for my experiments.

A RaspberryPi is just a CPU (a motherboard). To work with it, one needs a power source (a power cable), an input device (keyboard), and an output device (display monitor? TV?). One also needs to load the operating system on to the CPU, so one needs an external storage device (a microSD card) that contains the OS.

I bought a starter kit, followed a YouTube video to guide me on how to put the RaspberryPi into its official case, and then looked around to plug stuff into the ports and get started.

Rookie mistake.

The starter kit did not have a VGA to HDMI adapter (and my monitors don't have HDMI ports, only VGA).

Starter kits such as the one I bought are well-meaning but can contain stuff I don't need (and not contain stuff I need). Googling tells me it's cheaper to go for combo-boxes or starter kits than buying individual components, but I disagree. The very minimum things that I needed were these: the motherboard, a power source, and a microSD card loaded with the Raspbian OS. Had I bought just these, and a VGA-to-HDMI connector, I would've saved about eight hundred rupees.

So, here's a buying guide for you (I'm assuming you already have a monitor, a USB keyboard, and a USB mouse).
  1. Buy these 2 items: RaspberryPi 3B+ motherboard and a 2.4Amp power adapter with microUSB plug. I bought model 3 B+; there's a model 4 out too if you want that.
  2. If you already have a spare microSD card that you can dedicate to your RaspberryPi, go to the next step. If not, buy one, preferably one pre-loaded with the Raspbian OS. Or, you can load the card with the Raspbian OS from raspberrypi.org.
  3. See what port your TV or monitor has, and buy either a VGA-to-HDMI connector or an HDMI-to-HDMI connector (RaspberryPi has an HDMI port).

I bought the correct display connector and plugged in the keyboard, mouse, and display. Then, I looked around for a port to plug in the microSD card.

Another rookie mistake.

The microSD port is on the reverse side of the motherboard; to get to it, one needs to turn the motherboard over.
Which means, I had to unplug all of what I had earlier plugged in (because, I was scared of snagging one of those pins with a wire or something).

So, here's the correct order of plugging the components in:
  1. Turn the motherboard over and plug in the microSD card very slowly into the slot.
  2. Plug the keyboard and the mouse into USB ports.
  3. Connect the display to the HDMI port.
  4. If you're going to use wired internet, plug the LAN cable into the ethernet port (I was going to use WiFi).
  5. Plug the power adapter into the microUSB port.
  6. Switch the display on. Then, switch the power adapter on (googling told me the power adapter should be plugged in last and switched on last).

And voila! My tiny nano micro computer blinked red and started up. On the screen, I selected the Raspbian OS, clicked Install, followed the onscreen instructions, and then waited for the installation to be over (it took almost 15 minutes).

Googling also told me to update the packages after they're installed, so after the installation was over, I ran the following commands:
sudo apt-get update, which took about 10 minutes to complete.
sudo apt-get upgrade, which took about 15 minutes to complete.

Looks like I'm done setting up the computer. Next post, I'll talk about the chatbot back-end (which will be a MySQL database).


Meanwhile, since this is supposed to be my ultra-portable computer, I'll buy it an LCD touchscreen display.

Also, since the RaspberryPi official case cuts off all access to the GPIO connector pins, I'll buy it a case that keeps the pins accessible. The pins are needed to plug the LCD display in, and also for all of the IoT stuff (assuming I go that way later).

And, since I don't like the idea of having to turn the motherboard over every time I need to use a microSD card, I'll also buy it a USB microSD card reader.


Top comments (0)