




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The arduino code for an ir tester that uses an ir receiver to detect signals from an ir remote control and displays the detection status on both the serial monitor and a 16x2 lcd display. The code includes instructions for setting up the liquidcrystal library and configuring the arduino pins.
What you will learn
Typology: Lecture notes
1 / 252
This page cannot be seen from the preview
Don't miss anything!
Author Don Wilcher Reviewers Samuel de Ancos Liam Lacey Commissioning Editor Nadeem N. Bagban Acquisition Editor Harsha Bharwani Content Development Editor Ajinkya Paranjape Technical Editor Tejaswita Karvir Copy Editor Dipti Mankame Project Coordinator Harshal Ved Proofreader Safis Editing Indexer Priya Sane Graphics Sheetal Aute Production Coordinator Komal Ramchandani Cover Work Komal Ramchandani
electrical engineer with 26 years of experience. He has authored several books on Lego Robotics and Arduinos. His latest book published by Maker Media, titled Make: Basic Arduino Projects , has been approved by the Alabama State Department of Education to be on their reading list. He's also a Certified Electronics Technician (CETa) and Exam Administrator (CA) with ETA International as well as State Certified Teacher for Career Technical Education (CTE) as a Level 2 Specialist in electronics technology. He has worked on industrial robotic systems, automotive electronic modules/systems, and embedded wireless controls for small consumer appliances. While at the Chrysler Corporation, Don developed a weekend enrichment pre-engineering program for inner city kids. He's a contributing writer and webinar lecturer for Design News Magazine. He is also an electronics and robotics technologist who has developed 21st century educational products and training materials for Makers, hardware start-up entrepreneurs, and educators. I would like to thank my wife, Mattalene, and three children, Tiana, D'Vonn, and D'Mar, for their patience and understanding as I worked diligently to build and test Arduino circuits, coding, and writing during family time activities. This book is dedicated to you all. Also, I would like to thank my awesome Packt Publishing editors: Ajinkya Paranjape (content development editor), Harsha, Bharwani (acquisition editor), and Tejaswita V. Kavir (technical editor) for your patience, dedication, comments, and great suggestions on creating a wonderful book. I look forward to working with you all soon on another book project.
For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub. com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM https://www2.packtpub.com/books/subscription/packtlib Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Table of Contents
Table of Contents
Preface [ vi ] What this book covers Chapter 1 , A Sound Effects Machine, will teach the reader how to build an Arduino sound effects machine using an SD module, digital logic switches, a transistor speaker amplifier, and .wav files. Also, the reader will learn how to add a random function in order as to play different sounds automatically without using digital logic switches. Chapter 2 , Programmable DC Motor Controller with an LCD, shows the reader how to build an Arduino programmable controller to operate small DC motors. Also, to aid in operating the programmable controller, the reader will learn how to add a Liquid Crystal Display (LCD) to the electronic device as well. Chapter 3 , A Talking Logic Probe, explains a talking electronic instrument that the reader can build to test microcontroller and digital circuits. Also, the reader will learn how to wire an Arduino to an EMIC 2 (text-to-speech) module and program it using special character codes. Chapter 4 , Human Machine Interface, A Human Machine Interface (HMI) used in industrial controls to operate electromechancial devices, such as motors, will be discussed in this chapter. The reader will also learn how to build a HMI using an Arduino, a virtual server, and JavaScript to control a small DC motor. Chapter 5 , IR Remote Control Tester, allows the reader to learn how to build a testing device to check the operation of any IR remote control. Also, the reader will learn about IR detectors and digital codes using this electronic tester. Chapter 6 , A Simple Chat Device with LCD, will teach the reader how to send text messages to an Arduino using a Bluetooth Low Energy (BLE) device and an Android smartphone. Also, the RedBearLabs BLE Arduino shield used to send and receive text messages will be introduced to the reader in this chapter. Chapter 7 , Bluetooth Low Energy Controller, will show the reader how to send BLE control signals to an Arduino using the RedBearLabs BLE shield and an Android smartphone to control a DC motor. Also, a seven segment LED display's electrical operation will be discussed along with making letter characters using the BLE Controller. Chapter 8 , Capacitive Touch Sensing , explores a simple DC motor controller using an Arduino and a 555 timer IC-based capacitive touch sensor. The reader will learn the basic operation of the 555 timer by building an Arduino-enabled touch sensing controller. Chapter 9 , Arduino-SNAP Circuit AM Radio, introduces the reader the Elenco SNAP circuit kit by building an AM radio. Also, the reader will learn how to operate the AM radio using the RedBearLab BLE shield and an Android smartphone.
Preface [ vii ] Chapter 10 , Arduino Scrolling Marquee, discusses organic light-emitting diode (OLED) technology by building an Arduino-based scrolling marquee. Also, the reader will learn to use any ordinary IR handheld remote to control the scrolling effect of the OLED marquee. What you need for this book To build the awesome electronics gadgets and devices in this book, the following materials are required:
Preface [ ix ] Reader feedback Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of. To send us general feedback, simply e-mail feedback@packtpub.com, and mention the book's title in the subject of your message. If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors. Customer support Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase. Downloading the example code You can download the example code files from your account at http://www. packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you. Downloading the color images of this book We also provide you with a PDF file that has color images of the screenshots/ diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from: http://www.packtpub. com/sites/default/files/downloads/3601OS_ColoredImages.pdf. Errata Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub. com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
Preface [ x ] To view the previously submitted errata, go to https://www.packtpub.com/books/ content/support and enter the name of the book in the search field. The required information will appear under the Errata section. Piracy Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy. Please contact us at copyright@packtpub.com with a link to the suspected pirated material. We appreciate your help in protecting our authors and our ability to bring you valuable content. Questions If you have a problem with any aspect of this book, you can contact us at questions@packtpub.com, and we will do our best to address the problem.
A Sound Effects Machine [ 2 ]
Chapter 1 [ 3 ] The sound effects machine block diagram is an engineering tool used to convey a complete product design using simple graphics. The block diagram also makes it easier to plan the breadboard for prototyping and testing of the sound effects machine in a workshop or laboratory bench. One final observation of the sound effects machine block diagram is that the basic computer convention of inputs is on the left, the processor is located in the middle, and the outputs are placed on the right-hand side of the design layout. As shown, the tactile switches are on the left-hand side, the Arduino is located in the middle, and the small signal transistor amplifier with 8 ohm speaker is on the right-hand side of the block diagram. This left to right design method makes it easier to build the sound effects machine and troubleshoot the errors during the testing phase of project development. Building the sound effects machine The sound effects machine is quite simple in design and construction. There are a variety of ways to build this electronic device, such as on a Printed Circuit Board ( PCB ) or an experimenter board. The method I found to rapidly build this electronic device is to use a solderless breadboard, as shown in this diagram: