Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Internet of Things Programming Projects

You're reading from   Internet of Things Programming Projects Build modern IoT solutions with the Raspberry Pi 3 and Python

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher Packt
ISBN-13 9781789134803
Length 436 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Colin Dow Colin Dow
Author Profile Icon Colin Dow
Colin Dow
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Installing Raspbian on the Raspberry Pi FREE CHAPTER 2. Writing Python Programs Using Raspberry Pi 3. Using the GPIO to Connect to the Outside World 4. Subscribing to Web Services 5. Controlling a Servo with Python 6. Working with the Servo Control Code to Control an Analog Device 7. Setting Up a Raspberry Pi Web Server 8. Reading Raspberry Pi GPIO Sensor Data Using Python 9. Building a Home Security Dashboard 10. Publishing to Web Services 11. Creating a Doorbell Button Using Bluetooth 12. Enhancing Our IoT Doorbell 13. Introducing the Raspberry Pi Robot Car 14. Controlling the Robot Car Using Python 15. Connecting Sensory Inputs from the Robot Car to the Web 16. Controlling the Robot Car with Web Service Calls 17. Building the JavaScript Client 18. Putting It All Together 19. Assessments 20. Other Books You May Enjoy

Installing the Raspbian OS

The Raspbian OS is considered the default or go-to operating system for the Raspberry Pi. In this section, we will install Raspbian using the NOOBS image.

Formatting a microSD card for Raspbian

Raspberry Pi uses a microSD card to store the operating system. This allows you to easily switch between different operating systems (system images) for your Raspberry Pi. We will be installing the default Raspbian OS for our projects using the NOOBS image.

Start by inserting the microSD card into a USB adapter and plug it into your computer:

You may need to format the microSD card. If so, use the utilities appropriate for your computer's operating system to format the card to FAT32. It is recommended that you use a card with a capacity of 8 GB or greater. For Windows OS and cards with 64 GB of capacity or greater, a third-party tool such as FAT32 format should be used for formatting.

Copying the NOOBS files to the microSD RAM

Unzip the NOOBS image that you downloaded. Open up the unzipped directory and drag the files over to the microSD card.

The files should look the same as in the following screenshot:

Running the installer

We will now install Raspbian on our Raspberry Pi. This step should be familiar to those that have previous experience installing operating systems such as Windows or macOS. The Raspbian operating system will be installed and will run off of our microSD card.

To install Raspbian onto our microSD card, do the following:

  1. Start by inserting the microSD card into the appropriate slot on the Raspberry Pi. Be sure to install it so that the label side (opposite side of the exposed contacts) is facing up. Insert it with the metal contacts facing the board. The microSD card should have a slight ridge at the top of the label side, which is good for easy removal using a fingernail.
  2. Insert a keyboard and mouse into the USB slots on the side, a monitor into the HDMI port, and lastly, a USB power cable into the power port. The Raspberry Pi does not have an on/off switch and will power up as soon as the power cable is connected:
  1. After an initial black screen with rolling white text, you should see the following dialog:
  1. In the previous screenshot, we clicked on the Language option. For our purposes, we will keep the default of English (UK). We will also keep the keyboard at the standard gb.
  2. As the Raspberry Pi 3 has wireless LAN, we can set up our Wi-Fi (for older boards, please plug a Wi-Fi dongle into a USB port or use the wired LAN port and skip the next step):
  1. Click on the Wifi networks (w) button. Choose the Authentication method using the radio buttons. Some routers are equipped with a WPS button that allows you to connect directly to the router. To use the password method, choose the Password authentication radio button and enter the password for your network. After connecting to your network, you will notice that there are now more operating system options to select from:
  1. We will go with the top option, Raspbian. Check the box beside Raspbian [RECOMMENDED] and then click on the Install (i) button at the top-left corner of the dialog. Raspbian will start installing on your Raspberry Pi. You will see a progress bar with previous graphics, describing various features of the Raspbian operating system:
  1. After the progress bar hits 100%, the computer will reboot and you will see a screen with text before the default desktop loads up:
You have been reading a chapter from
Internet of Things Programming Projects
Published in: Oct 2018
Publisher: Packt
ISBN-13: 9781789134803
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 R$50/month. Cancel anytime