Book Image

Raspberry Pi Networking Cookbook - Second Edition

By : Rick Golden
Book Image

Raspberry Pi Networking Cookbook - Second Edition

By: Rick Golden

Overview of this book

<p>With increasing interest in Maker Projects and the Internet of Things (IoT), students, scientists, and hobbyists are using the Raspberry Pi as a reliable, inexpensive platform to connect local devices to Internet services.</p> <p>This book begins with recipes that are essential to installing the Raspberry Pi and configuring it for network access. Then it continues with recipes on installing common networking services such as firewalls and file sharing.</p> <p>The final chapters include recipes for network monitoring, streaming data from the Raspberry Pi to IoT services, and using clusters of Raspberry Pis to store and analyze large volumes of data.</p>
Table of Contents (14 chapters)
Raspberry Pi Networking Cookbook Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Easy access to hardware


This recipe demonstrates how simple it is to access hardware from a Raspberry Pi.

In this recipe, an LED connected to one of the Raspberry Pi's GPIO pins is made to blink using simple Bash commands (ls, cat, and echo).

After completing this recipe, you will be able to control the GPIO ports attached to your Raspberry Pi from the Bash command line.

Getting ready

Ingredients:

  • An Initial Setup or Basic Networking setup for the Raspberry Pi that is not powered on

  • An LED

  • A pushbutton switch

  • Three 330 Ohm resisters

  • A breadboard

  • A few breadboarding wires

This recipe does not require the desktop GUI and could either be run from the text-based console or from within an LXTerminal.

If the Raspberry Pi's Secure Shell server is running, this recipe can be completed remotely using a Secure Shell client.

How to do it...

The steps to easily accessing hardware from the command line are:

  1. Before powering on the Raspberry Pi, use the following two diagrams to connect a pushbutton switch to GPIO port...