Book Image

Learning Raspberry Pi

By : Samarth Shah, Serge Schneider
Book Image

Learning Raspberry Pi

By: Samarth Shah, Serge Schneider

Overview of this book

Table of Contents (14 chapters)
Learning Raspberry Pi
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Developing an e-mail notifier


This section is an extension of the digital clock that you have developed in the previous section. In addition to all the components mentioned in the previous section, you will require one green LED and one red LED for displaying the status. In this section, you will develop an e-mail notifier, which will turn red if you have any unread e-mails and it will turn green if you have no unread e-mails. This will also show the count of unread messages on the LCD by using the code that you have developed in the previous section.

Connecting LCD pins and Raspberry Pi GPIO pins

As this is an extension of the previous section, first make sure you have connected the LCD pins and Raspberry GPIO pins as mentioned previously. In addition to the connection you have made, you have to connect two LEDs at Raspberry Pi Pin 14 and Pin 15. Connect the anode of the green LED and red LED to Pin 14 and Pin 15 respectively. Similarly, connect the cathode of both LEDs to GND. Complete the...