Arduino™ + Android™ Projects for the Evil Genius

4
Arduino™ + Android™ Projects for the Evil Genius Control Arduino with Your Smartphone or Tablet Simon Monk Mc Graw Hill New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto

Transcript of Arduino™ + Android™ Projects for the Evil Genius

Page 1: Arduino™ + Android™ Projects for the Evil Genius

Arduino™ + Android™

Projects for the Evil Genius

Control Arduino with Your Smartphone or Tablet

Simon Monk

Mc Graw Hill

New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul

Singapore Sydney Toronto

Page 2: Arduino™ + Android™ Projects for the Evil Genius

Contents at a Glance

PART ONE Android Peripherals

1 Bluetooth Robot 3

2 Android Geiger Counter 17

3 Android Light Show 37

4 TV Remote 55

5 Temperature Logger 63

6 Ultrasonic Range Finder 73

PART TWO Home Automation

7 Home Automation Controller 85

8 Power Control I l l

9 Smart Thermostat 129

10 RFID Door Lock 145

11 Signaling Flags 163

12 Delay Timer 171

Appendix: Open Accessory Primer 183

Index 193

Page 3: Arduino™ + Android™ Projects for the Evil Genius

Contents

Acknowledgments xiii

Introduction xv

PART O N E Andro id Peripherals

1 Bluetooth Robot 3 Construction 3 Theory 14 Summary 15

2 Android Geiger Counter 17 Google Open Accessory 18 Construction 18 Theory 30 Summary 35

3 Android Light Show 37 Construction: The Droid Accessory Base 38 Construction: The Light Show Project 43 Using the Project 50 Theory 50 Summary 53

4 TV Remote 55 Construction 56 Using the Project 60 Theory 60 Summary 61

5 Temperature Logger 63 Construction 64 Using the Project 68 Theory 70 Summary 71

6 Ultrasonic Range Finder 73 Construction 74 Using the Project 79 Theory 79 Summary 81

xi

Page 4: Arduino™ + Android™ Projects for the Evil Genius

Arduino + Android Projects for the Evil Genius

PART TWO Home Automation

7 Home Automation Controller 85 The Sound Link Module 87 Android Software 99 Internet Access 102 Theory 103 Summary 110

8 Power Control I l l Power Control Electronics I l l Constructing the Power Control Module 112 Adding It to the Home Automation Controller 120 Setting Up Your Home 124 Theory 124 Summary 128

9 Smart Thermostat 129 Construction 130 Using the System 140 Theory 141 Summary 144

10 RFID Door Lock 145 Construction 146 Using the System 156 Theory 157 Summary 161

11 Signaling Flags 163 Construction 164 Theory 168 Summary 169

12 Delay Timer 171 Construction 171 Theory 178 Summary 181

Appendix: Open Accessory Primer 183 Learning Android Programming 183 Arduino Programming 183 The Example 183 On the Arduino 184 Android 186 Conclusion 192

Index 193