Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Full Stack Web Development with Raspberry Pi 3

You're reading from   Full Stack Web Development with Raspberry Pi 3 Build complex web applications with a portable computer

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781788295895
Length 214 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Soham Kamani Soham Kamani
Author Profile Icon Soham Kamani
Soham Kamani
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. Getting Started on the Raspberry Pi FREE CHAPTER 2. Getting Up-and-Running with Web Development on the Raspberry Pi 3. Running a Node Server on the Pi 4. Extracting Information from the GPIO Pins 5. Retrieving Sensor Readings from the Server 6. Creating a Web Page to Display Sensor Data 7. Enhancing Our UI - Using Interactive Charts 8. SQLite - The Fast and Portable Database 9. Integrating SQLite into Our Application 10. Making our Application Real Time with Web Sockets 11. Deploying our application to Firebase 12. Using Firebase APIs to Update Our Application

Setting up our Raspberry Pi

So far, we've been reading a lot of theory. Now let's actually get our Raspberry Pi working. Before we get started, here is a list of things you need at the bare minimum to get your Pi up-and-running:

  • The Raspberry Pi (duh)
  • An SD card (8 GB or higher)
  • A micro USB power source (many phone chargers are of this type so you might have one already)
  • A keyboard and mouse
  • Any screen or display with an HDMI port and cable
  • A laptop (optional)

Have everything? Awesome! Let's move on...

There are lots of operating systems and lots of ways to install them on the Pi. However, the easiest way by far is to use the official NOOBS installer. NOOBS, which stands for New Out Of Box Software, is the officially recommended way to install a fresh OS on the Pi for newcomers, and it's terribly easy.

Download the NOOBS archive from official website (https://www.raspberrypi.org/downloads/noobs/). Once the archive is downloaded, unzip it into a new folder anywhere on your computer.

If you are using NOOBS v2.3.0, the directory structure, once you unzip the archive, should look like this:

BUILD-DATA
INSTRUCTIONS-README.txt
RECOVERY_FILES_DO_NOT_EDIT
bcm2708-rpi-0-w.dtb
bcm2708-rpi-b-plus.dtb
bcm2708-rpi-b.dtb
bcm2708-rpi-cm.dtb
bcm2709-rpi-2-b.dtb
bcm2710-rpi-3-b.dtb
bcm2710-rpi-cm3.dtb
bootcode.bin
defaults
os
overlays
recovery.cmdline
recovery.elf
recovery.img
recovery.rfs
recovery7.img
riscos-boot.bin

Most of these files have no meaning to us except the INSTRUCTIONS-README.txt file. Open this file in any text editor (such as Notepad), and you will find instructions on how to format your SD card.

After formatting your SD card, transfer all these files and folders to the root directory of the SD card. As described in the instructions, all files and folders should be copied in such a way that the INSTRUCTIONS-README.txt file is at the root.

Once your SD card is ready and loaded, connect everything to your Pi:

  1. Insert the SD card into the slot.
  2. Using the HDMI cable, connect the HDMI port of the Pi with the external display.
  3. Connect the keyboard and mouse to the USB ports of the Pi
  4. Connect the power cable to the Micro USB port of the Pi

Once all the connections are made, switch on the power supply to your Pi. You should now see the monitor light up. After a few boot screens, you should see a friendly little GUI that will lead you to this:

It's here that you can select the OS you want in order to install to your Pi. For this book, we will be working with Raspbian.

Raspbian is a port of the Debian Linux OS, that has been optimized for the Pi. It is currently the most popular OS that runs on the Pi. Follow the installation wizard, and you should be done with the installation in a few minutes.

Once your installation is done, your Pi will boot into the OS, and you should now see a complete desktop on your monitor screen, something that looks like this:


Congratulations! You have successfully set up your Raspberry Pi computer. Amazingly, there are a lot of things you can do like you're using a regular desktop computer. The Raspberry Pi, along with the Raspbian OS, comes with a variety of programs, such as a text editor, a file explorer, and even an HTML5 web browser!

You have been reading a chapter from
Full Stack Web Development with Raspberry Pi 3
Published in: Aug 2017
Publisher: Packt
ISBN-13: 9781788295895
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image