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
Raspberry Pi Embedded Projects Hotshot

You're reading from   Raspberry Pi Embedded Projects Hotshot Enter the world of mechatronic systems with the Raspberry Pi to design and build 12 amazing projects

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781849696227
Length 250 pages
Edition 1st Edition
Concepts
Arrow right icon
Toc

Table of Contents (15) Chapters Close

Preface 1. Hello World FREE CHAPTER 2. A Raspberry WebIDE Example 3. The Arduino Raspberry Pi Interface 4. Christmas Light Sequencer 5. Internet of Things Example – An E-mail Alert Water Fountain 6. Raspberry Pi as a Personal Assistant 7. Raspberry Pi-based Line Following Robot 8. Connect Four Desktop Game using Raspberry Pi 9. The Raspberry Pi-enabled Pet/Wildlife Monitor 10. Raspberry Pi Personal Health Monitor 11. Home Automation using Raspberry Pi 12. Using a Raspberry Pi for Science and Education 13. Tips and Tricks Index

Electrical output of our program

In the previous section, we wrote a program to make an LED blink. Let's look at the electrical connection to observe the output of our program. We will connect a resistor between the GPIO pin and the anode of the LED. We will connect the cathode to the ground pin of the Raspberry Pi.

Engage thrusters

We will connect the LED and the resistor to the GPIO pin and the ground pin, as shown in this image:

Engage thrusters

LED blinking circuit

Note

If we are not careful with the handling of the Raspberry Pi GPIO pins, it may either temporarily reset the Raspberry Pi or sometimes even permanently damage the GPIO pin. There are several tutorials in basic electronics available over the Web. It is important that you familiarize yourself with the basics of electronics.

Once we connect the circuit as shown in the preceding image, we will be able to execute the program and conclude our experiment.

We can execute the program by running the module, as shown in the following screenshot:

Engage thrusters

Executing the Python example

Objective complete – mini debriefing

That's it! We have wet our feet by saying Hello World by blinking an LED! On our way to bigger and better things, let's stop and examine the Pi Crust for a moment.

Introduction to the Pi Crust – a prototyping platform for the Raspberry Pi

Now that our Hello World example is done, we will leave you with one more thing. Throughout this book, we will review some add-on hardware to access the GPIO peripherals on the Raspberry Pi. In this project, we will discuss the Pi Crust board for the Raspberry Pi.

The Pi Crust board was designed by Joe Walnes. It is a board that is stackable on the Raspberry Pi and eliminates the need for a breadboard to prototype circuits.

Introduction to the Pi Crust – a prototyping platform for the Raspberry Pi

A Pi Crust board

The Pi Crust is an open source add-on hardware and costs approximately $14 to build one ourselves. The design can be downloaded free of cost from http://picru.st.

So, it is up to you to decide whether you want to simply buy one, build one, or as we are prone to encourage, improve upon it and open source it for others to benefit!

The main advantage behind Pi Crust is that it is aids prototyping. It allows easy access to the I2C interface, SPI interface, UART port, and the GPIO pins. The following figure shows BlinkM—an I2C-driven RGB LED mounted on top of the Pi Crust.

Introduction to the Pi Crust – a prototyping platform for the Raspberry Pi

Pi Crust stacked on top of the Raspberry Pi

You have been reading a chapter from
Raspberry Pi Embedded Projects Hotshot
Published in: Feb 2015
Publisher:
ISBN-13: 9781849696227
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 €18.99/month. Cancel anytime