Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
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
 Kamani Kamani
Author Profile Icon Kamani
Kamani
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Title Page
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
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

The pin as a standalone component


Let's take a deep dive and look at how exactly each GPIO pin on the Pi works. Each pin has two functions, which are what make up the IO in GPIO. Each pin can write binary values (and by values, what I mean is it can give an output between 0 and 3.3v) and also read binary values.

The Write mode

In the Write mode, the Raspberry Pi acts as a switch and a power source.

This diagram represents the hello world of circuits, that is, an LED along with a resistor connected to a power source. An important thing to remember is that any GPIO pin needs a reference, relative to which it can be high or low.

The Raspberry Pi can act as either end of this circuit and has two different ways of being an output pin based on the reference pin we use.

  • The first configuration is when we use the ground pin as the reference pin.

Here, the LED pin will glow when the GPIO pin is high relative to the ground pin and will be switched off when it is low.

  • If you haven't guessed it already, the...
lock icon The rest of the chapter is locked
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 $15.99/month. Cancel anytime
Visually different images