Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Raspberry Pi Android Projects

You're reading from  Raspberry Pi Android Projects

Product type Book
Published in Sep 2015
Publisher
ISBN-13 9781785887024
Pages 138 pages
Edition 1st Edition
Languages
Author (1):
Gökhan Kurt Gökhan Kurt
Profile icon Gökhan Kurt

Sending more commands from your Android phone to the Pi


In the previous section, we have sent the reboot command from Android to the Pi. In this section, we will send two new commands. One to light up a LED that we will connect to the Pi, and another to play sound on the Pi. These commands will be reused in the forthcoming sections.

Lighting the LEDs

We'll begin by connecting a LED light to the GPIO ports of the Pi. The LEDs usually come with a short and long leg. Connect a resistor to the short leg of the LED, and connect a female/female jumper to the other side of the resistor. This jumper should then be connected to one of the ground pins of the Pi. Take a look at the schema in Chapter 2, Server Management with Pi, to identify the pins. Note that we already used one of the ground pins when we connected our temperature-humidity sensor to the Pi. However, there are plenty of ground pins available. The long leg of the LED should be connected to one of the GPIO pins. We will choose number 17...

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}