Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 229 trang
THÔNG TIN TÀI LIỆU
Cấu trúc
Cover
Table of Contents
Acknowledgments
Preface
Who Should Read This Book
What's in This Book
Arduinos, Androids, and iPhones, Oh My!
Code Examples and Conventions
Online Resources
Part I—Preparations
1. Getting Started
What Is Home Automation?
Commercial Solutions
DIY Solutions
Justifying the Investment
Setting Up Your Workbench
Sketching Out Your Ideas
Writing, Wiring, and Testing
Documenting Your Work
2. Requirements
Knowing the Hardware
Knowing the Software
Be Safe, Have Fun!
Part II—Projects
3. Water Level Notifier
What You Need
Building the Solution
Hooking It Up
Sketching Things Out
Writing the Web Mailer
Adding an Ethernet Shield
All Together Now
Next Steps
4. Electric Guard Dog
What You Need
Building the Solution
Dog Assembly
Dog Training
Testing It Out
Unleashing the Dog
Next Steps
5. Tweeting Bird Feeder
What You Need
Building the Solution
The Perch Sensor
The Seed Sensor
Going Wireless
Tweeting with Python
Putting It All Together
Next Steps
6. Package Delivery Detector
What You Need
Building the Solution
Hardware Assembly
Writing the Code
The Package Delivery Sketch
Testing the Delivery Sketch
The Delivery Processor
Creating the Delivery Database
Installing the Package Dependencies
Writing the Script
Testing the Delivery Processor
Setting It Up
Next Steps
7. Web-Enabled Light Switch
What You Need
Building the Solution
Hooking It Up
Writing the Code for the Web Client
Testing Out the Web Client
Writing the Code for the Android Client
Testing Out the Android Client
Next Steps
8. Curtain Automation
What You Need
Building the Solution
Using the Stepper Motor
Programming the Stepper Motor
Adding the Sensors
Writing the Sketch
Installing the Hardware
Next Steps
9. Android Door Lock
What You Need
Building the Solution
Controlling the Android Door Lock
Writing the Android Server
Writing the Android Client
Test and Install
Next Steps
10. Giving Your Home a Voice
What You Need
Speaker Setup
Giving Lion a Voice
Wireless Mic Calibration
Programming a Talking Lion
Conversing with Your Home
Next Steps
Part III—Predictions
11. Future Designs
Living in the Near
The Long View
The Home of the Future
12. More Project Ideas
Clutter Detector
Electricity Usage Monitor
Electric Scarecrow
Entertainment System Remote
Home Sleep Timer
Humidity Sensor-Driven Sprinkler System
Networked Smoke Detectors
Proximity Garage Door Opener
Smart HVAC Controller
Smart Mailbox
Smart Lighting
Solar and Wind Power Monitors
Part IV—Appendices
A1. Installing Arduino Libraries
Apple OSX
Linux
Windows
A2. Bibliography
Index
Nội dung
[...]... to the Android, Arduino, and XBee titles in Appendix 2, Bibliography, on page 213, for more information on these remarkable, transformative technologies AndroidProgramming The Android operating system is continuing its rapid expansion and domination in certain telecommunications and embedded systems markets Google announced its Android @Home initiative and is encouraging developers and consumer electronics... for Arduino microcontrollers to scripts that execute on a computer designed to control, capture, and process the data from the assembled hardware elements The book concludes with a chapter on future projections in home automation and a chapter filled with idea starters that reuse the hardware and software approaches demonstrated in the eight projects report erratum • discuss Arduinos, Androids, and. .. load and respond faster than their browser-based counterparts 3 4 http:/ /developer .android. com/guide/topics/usb/adk.html http:/ /jquerymobile.com/ report erratum • discuss Knowing the Hardware • 15 While it’s not necessary to have prior experience developing Android applications to build the Android programs in this book, it will certainly help to have some familiarity with the Android SDK.5 Arduino Programming. .. comes bundled with dozens of sample sketches to help you quickly learn the syntax and realize the number of different sensors and motors that the Arduino can interact with And because it is based on Java, the Arduino IDE will run identically on Windows, Mac, and Linux computers 5 http:/ /developer .android. com/sdk report erratum • discuss 16 • Chapter 2 Requirements Joe asks: Does the Arduino IDE Have... than a computerand the choice of language and frameworks the programming logic executes within But with the addition of hardware sensors, motors, and purpose-built radios and controllers, the design and construction workflow is a little more complex Essentially, you are building two major components with each project: the physical collection of hardware and the software that 1 http:/ /arduino. cc/ report... accomplishment And who knows? Your nifty home automation creations may even change the world and become a huge new business opportunity for other homeowners actively seeking an automation solution that saves them time and money Who Should Read This Book ProgrammingYourHome is best suited to DIYers, programmers, and tinkerers who enjoy spending their leisure time building high-tech solutions to further automate. .. distribution, and a Mac Mini will be more than adequate for the OS X crowd This home server should be a reasonably inexpensive component in the ProgrammingYourHome hardware collection 7 http:/ /www.digi.com/xbeewifi report erratum • discuss 18 • Chapter 2 Requirements Java familiarity will come in handy when writing the Android client and server applications later in the book Experience with Python and Ruby... residentially oriented attempts at standards, such as CEBus and Insteon, have been made, but none have attained broad adoption in the home This is partly due to the chicken -and- egg problem of having appliance andhome electronics manufacturers create devices with these interfaces and protocols designed into their products Most recently, Google has placed its bet on the Android operating system being embedded... lives and impress their friends and family with their creations Essentially, it is for those who generally enjoy creating custom technology and electronics solutions for their own personal living space A basic understanding of Arduino and programming languages like Ruby and Python are recommended but not required You will learn how to combine these technologies in unique configurations to resolve homemaker... creations OK, enough with the requirements and disclaimers Let’s dive into the next section, where we will finally get to assemble and code some really nifty and unique home automation projects! report erratum • discuss Be Safe, Have Fun! • 19 Proceed at Your Own Risk You Have Been Warned! Your safety is your own responsibility Use of the instructions and suggestions in this book is entirely at your own risk . fun and enthusiastic survey of electronic devices that can interact with the real world and that starts in your own home! ➤ John Winans, Chief Software Architect Programming Your Home Automate with. 146 9.3 Controlling the Android Door Lock 150 9.4 Writing the Android Server 154 9.5 Writing the Android Client 166 9.6 Test and Install 170 9.7 Next Steps 171 10. Giving Your Home a Voice . . . Home Automate with Arduino, Android, and Your Computer Mike Riley The Pragmatic Bookshelf Dallas, Texas • Raleigh, North Carolina Many of the designations used by manufacturers and sellers to distinguish