新书报道
当前位置: 首页 >> 电类优秀教材 >> 正文
Arduino Sketches : Tools and Techniques for Programming Wizardry
发布日期:2015-12-17  浏览

Arduino Sketches : Tools and Techniques for Programming Wizardry

[Book Description]

Master programming Arduino with this hands-on guide Arduino Sketches is a practical guide to programming the increasingly popular microcontroller that brings gadgets to life. Accessible to tech-lovers at any level, this book provides expert instruction on Arduino programming and hands-on practice to test your skills. You'll find coverage of the various Arduino boards, detailed explanations of each standard library, and guidance on creating libraries from scratch plus practical examples that demonstrate the everyday use of the skills you're learning. Work on increasingly advanced programming projects, and gain more control as you learn about hardware-specific libraries and how to build your own. Take full advantage of the Arduino API, and learn the tips and tricks that will broaden your skillset. The Arduino development board comes with an embedded processor and sockets that allow you to quickly attach peripherals without tools or solders. It's easy to build, easy to program, and requires no specialized hardware. For the hobbyist, it's a dream come true especially as the popularity of this open-source project inspires even the major tech companies to develop compatible products.Arduino Sketches is a practical, comprehensive guide to getting the most out of your Arduino setup. You'll learn to: * Communicate through Ethernet, WiFi, USB, Firmata, and Xbee * Find, import, and update user libraries, and learn to create your own * Master the Arduino Due, Esplora, Yun, and Robot boards for enhanced communication, signal-sending, and peripherals * Play audio files, send keystrokes to a computer, control LED and cursor movement, and more This book presents the Arduino fundamentals in a way that helps you apply future additions to the Arduino language, providing a great foundation in this rapidly-growing project. If you're looking to explore Arduino programming, Arduino Sketches is the toolbox you need to get started.

 
[Table of Contents]
Introduction                                       xxix
Part I Introduction to Arduino                     1   (62)
  Chapter 1 Introduction to Arduino                3   (22)
    Atmel AVR                                      5   (2)
    The Arduino Project                            7   (1)
    The ATmega Series                              8   (1)
      The ATmega Series                            8   (1)
      The ATtiny Series                            8   (1)
      Other Series                                 9   (1)
    The Different Arduinos                         9   (11)
      Arduino Uno                                  10  (1)
      Arduino Leonardo                             10  (1)
      Arduino Ethernet                             11  (1)
      Arduino Mega 2560                            11  (2)
      Arduino Mini                                 13  (1)
      Arduino Micro                                13  (1)
      Arduino Due                                  13  (1)
      LilyPad Arduino                              14  (2)
      Arduino Pro                                  16  (1)
      Arduino Robot                                16  (2)
      Arduino Esplora                              18  (1)
      Arduino Yiln                                 18  (1)
      Arduino Tre                                  19  (1)
      Arduino Zero                                 19  (1)
      Your Own Arduino?                            20  (1)
    Shields                                        20  (2)
      What Is a Shield?                            20  (1)
      The Different Shields                        21  (1)
      Arduino Motor Shield                         21  (1)
      Arduino Wireless SD Shield                   21  (1)
      Arduino Ethernet Shield                      21  (1)
      Arduino WiFi Shield                          22  (1)
      Arduino GSM Shield                           22  (1)
      Your Own Shield                              22  (1)
    What Can You Do with an Arduino?               22  (1)
    What You Will Need for This Book               23  (1)
    Summary                                        24  (1)
  Chapter 2 Programming for the Arduino            25  (20)
    Installing Your Environment                    26  (3)
      Downloading the Software                     27  (1)
      Running the Software                         28  (1)
      Using Your Own IDE                           29  (1)
    Your First Program                             29  (4)
    Understanding Your First Sketch                33  (3)
    Programming Basics                             36  (6)
      Variables and Data Types                     36  (2)
      Control Structures                           38  (4)
        if Statement                               38  (1)
        switch Case                                39  (1)
        while Loop                                 40  (1)
        for Loop                                   41  (1)
      Functions                                    42  (1)
      Libraries                                    42  (1)
    Summary                                        42  (3)
  Chapter 3 Electronics Basics                     45  (18)
    Electronics 101                                46  (1)
    Voltage, Amperage, and Resistance              46  (3)
      Voltage                                      47  (1)
      Amperage                                     48  (1)
      Resistance                                   48  (1)
        Ohm's Law                                  49  (1)
    The Basic Components                           49  (7)
      Resistors                                    50  (3)
        Different Resistor Values                  50  (1)
        Identifying Resistor Values                50  (2)
        Using Resistors                            52  (1)
      Capacitors                                   53  (1)
        Using Capacitors                           54  (1)
      Diodes                                       54  (1)
        Different Types of Diodes                  54  (1)
        Using Diodes                               55  (1)
      Light-Emitting Diodes                        55  (1)
        Using LEDs                                 55  (1)
      Transistors                                  56  (1)
      Using Transistors                            56  (1)
    Breadboards                                    56  (1)
    Inputs and Outputs                             57  (1)
    Connecting a Light-Emitting Diode              58  (3)
      Calculation                                  58  (1)
      Software                                     59  (1)
      Hardware                                     60  (1)
      What Now?                                    61  (1)
    Summary                                        61  (2)
Part II Standard Libraries                         63  (226)
  Chapter 4 The Arduino Language                   65  (16)
    I/O Functions                                  65  (5)
      Digital I/O                                  65  (2)
        pinMode()                                  66  (1)
        digitalRead()                              66  (1)
        digital Write()                            67  (1)
      Analog I/O                                   67  (2)
        analogRead()                               68  (1)
        analogWrite()                              68  (1)
      Generating Audio Tones                       69  (1)
        tone()                                     69  (1)
        noTone()                                   69  (1)
      Reading Pulses                               69  (1)
        pulseIn()                                  70  (1)
    Time Functions                                 70  (2)
      delay()                                      70  (1)
      delayMicroseconds()                          71  (1)
      millis()                                     71  (1)
      micros()                                     71  (1)
    Mathematical Functions                         72  (3)
      min()                                        72  (1)
      max()                                        72  (1)
      constrain()                                  73  (1)
      abs()                                        73  (1)
      map()                                        73  (1)
      pow()                                        74  (1)
      sqrt()                                       74  (1)
      random()                                     74  (1)
    Trigonometry                                   75  (1)
      sin()                                        76  (1)
      cos()                                        76  (1)
      tan()                                        76  (1)
      Constants                                    76  (1)
    Interrupts                                     76  (3)
      attachInterrupt()                            77  (1)
      detachInterrupt()                            78  (1)
      noInterrupts()                               78  (1)
      interrupts()                                 78  (1)
    Summary                                        79  (2)
  Chapter 5 Serial Communication                   81  (20)
    Introducing Serial Communication               82  (2)
    UART Communications                            84  (2)
      Baud Rate                                    84  (1)
      Data Bits                                    85  (1)
      Parity                                       85  (1)
      Stop Bits                                    86  (1)
    Debugging and Output                           86  (1)
    Starting a Serial Connection                   87  (1)
    Writing Data                                   88  (3)
      Sending Text                                 88  (2)
      Sending Data                                 90  (1)
    Reading Data                                   91  (4)
      Starting Communications                      91  (1)
      Is Data Waiting?                             91  (1)
      Reading a Byte                               92  (1)
      Reading Multiple Bytes                       92  (1)
      Taking a Peek                                93  (1)
      Parsing Data                                 93  (1)
      Cleaning Up                                  94  (1)
    Example Program                                95  (3)
    SoftwareSerial                                 98  (1)
    Summary                                        99  (2)
  Chapter 6 EEPROM                                 101 (16)
    Introducing EEPROM                             101 (2)
    The Different Memories on Arduino              103 (1)
    The EEPROM Library                             104 (9)
      Reading and Writing Bytes                    104 (1)
      Reading and Writing Bits                     105 (2)
      Reading and Writing Strings                  107 (1)
      Reading and Writing Other Values             108 (2)
      Example Program                              110 (3)
    Preparing EEPROM Storage                       113 (1)
    Adding Nonvolatile Memory                      114 (1)
    Summary                                        115 (2)
  Chapter 7 SPI                                    117 (16)
    Introducting SPI                               118 (1)
    SPI Bus                                        118 (2)
      Comparison to RS-232                         119 (1)
      Configuration                                119 (1)
      Communications                               120 (1)
    Arduino SPI                                    120 (1)
    SPI Library                                    121 (2)
    SPI on the Arduino Due                         123 (2)
    Example Program                                125 (7)
      Hardware                                     126 (2)
      Sketch                                       128 (3)
      Exercises                                    131 (1)
    Summary                                        132 (1)
  Chapter 8 Wire                                   133 (16)
    Introducing Wire                               134 (1)
    Connecting IイC                                 135 (1)
    IイC Protocol                                   135 (3)
      Address                                      136 (1)
      Communication                                137 (1)
    Communicating                                  138 (9)
      Master Communications                        139 (2)
        Sending Information                        139 (1)
        Requesting Information                     140 (1)
      Slave Communications                         141 (6)
        Receiving Information                      141 (1)
        Sending Information                        142 (1)
        Example Program                            142 (4)
        Exercises                                  146 (1)
    Traps and Pitfalls                             147 (1)
      Voltage Difference                           147 (1)
      Bus Speed                                    147 (1)
      Shields with IイC                             148 (1)
    Summary                                        148 (1)
  Chapter 9 Ethernet                               149 (20)
    Introduction                                   149 (1)
    Ethernet                                       150 (2)
      Ethernet Cables                              151 (1)
      Switches and Hubs                            151 (1)
      PoE                                          152 (1)
    TCP/IP                                         152 (2)
      MAC Address                                  153 (1)
      IP Address                                   153 (1)
      DNS                                          153 (1)
      Port                                         153 (1)
    Ethernet on Arduino                            154 (3)
      Importing the Ethernet Library               154 (1)
      Starting Ethernet                            155 (2)
    Arduino as a Client                            157 (10)
      Sending and Receiving Data                   158 (3)
        Connecting to a Web Server                 159 (2)
      Example Program                              161 (2)
      Arduino as a Server                          163 (2)
        Serving Web Pages                          164 (1)
      Example Program                              165 (6)
        Sketch                                     165 (2)
    Summary                                        167 (2)
  Chapter 10 WiFi                                  169 (22)
    Introduction                                   170 (1)
    The WiFi Protocol                              171 (2)
      Topology                                     171 (1)
      Network Parameters                           172 (1)
        Channels                                   172 (1)
        Encryption                                 172 (1)
        SSID                                       173 (1)
        RSSI                                       173 (1)
    Arduino WiFi                                   173 (6)
      Importing the Library                        174 (1)
      Initialization                               174 (1)
      Status                                       175 (1)
      Scanning Networks                            176 (1)
      Connecting and Configuring                   177 (1)
      Wireless Client                              178 (1)
      Wireless Server                              179 (1)
    Example Application                            179 (11)
      Hardware                                     181 (1)
      Sketch                                       182 (7)
      Exercises                                    189 (1)
    Summary                                        190 (1)
  Chapter 11 LiquidCrystal                         191 (16)
    Introduction                                   192 (2)
    LiquidCrystal Library                          194 (5)
      Writing Text                                 195 (1)
      Cursor Commands                              196 (1)
      Text Orientation                             197 (1)
      Scrolling                                    197 (1)
      Custom Text                                  198 (1)
    Example Program                                199 (6)
      Hardware                                     200 (1)
      Software                                     201 (4)
      Exercises                                    205 (1)
    Summary                                        205 (2)
  Chapter 12 SD                                    207 (18)
    Introduction                                   208 (3)
    SD Cards                                       211 (2)
      Capacity                                     212 (1)
      Speed                                        213 (1)
    Using SD Cards with Arduino                    213 (2)
      Accepted SD Cards                            214 (1)
      Limitations                                  214 (1)
    The SD Library                                 215 (5)
      Importing the Library                        215 (1)
      Connecting a Card                            215 (1)
      Opening and Closing Files                    216 (1)
      Reading and Writing Files                    217 (1)
        Reading Files                              217 (1)
        Writing Files                              218 (1)
      Folder Operations                            218 (1)
      Card Operations                              219 (1)
      Advanced Usage                               220 (1)
    Example Program and Sketch                     220 (4)
    Summary                                        224 (1)
  Chapter 13 TFT                                   225 (16)
    Introduction                                   226 (1)
    Technologies                                   227 (1)
    TFT Library                                    228 (5)
      Initialization                               228 (1)
      Screen Preparation                           229 (1)
      Text Operations                              230 (1)
      Basic Graphics                               231 (1)
      Coloring                                     232 (1)
      Graphic Images                               232 (1)
    Example Application                            233 (6)
      Hardware                                     234 (1)
      Sketch                                       234 (5)
      Exercises                                    239 (1)
    Summary                                        239 (2)
  Chapter 14 Servo                                 241 (12)
    Introduction to Servo Motors                   242 (1)
    Controlling Servo Motors                       243 (3)
      Connecting a Servo Motor                     243 (1)
      Moving Servo Motors                          244 (1)
      Disconnecting                                245 (1)
      Precision and Safety                         246 (1)
    Example Application                            246 (5)
      Schematic                                    248 (1)
      Sketch                                       249 (1)
      Exercises                                    250 (1)
    Summary                                        251 (2)
  Chapter 15 Stepper                               253 (8)
    Introducing Motors                             254 (1)
    Controlling a Stepper Motor                    254 (2)
      Hardware                                     255 (1)
      Unipolar Versus Bipolar Stepper Motors       255 (1)
    The Stepper Library                            256 (1)
    Example Project                                257 (3)
      Hardware                                     257 (1)
      Sketch                                       258 (2)
    Summary                                        260 (1)
  Chapter 16 Firmata                               261 (10)
    Introducing Firmata                            262 (1)
    Firmata Library                                262 (6)
      Sending Messages                             263 (1)
      Receiving Messages                           263 (1)
      Callbacks                                    264 (2)
      SysEx                                        266 (2)
    Example Program                                268 (1)
    Summary                                        269 (2)
  Chapter 17 GSM                                   271 (18)
    Introducing GSM                                272 (1)
    Mobile Data Network                            272 (4)
      GSM                                          273 (1)
        GPRS                                       274 (1)
        EDGE                                       274 (1)
      3 G                                          274 (1)
      4 G and the Future                           275 (1)
      Modems                                       275 (1)
    Arduino and GSM                                276 (1)
    Arduino GSM Library                            276 (9)
      GSM Class                                    278 (1)
      SMS Class                                    279 (2)
      VoiceCall Class                              281 (1)
      GPRS                                         282 (2)
      Modem                                        284 (1)
    Example Application                            285 (3)
    Summary                                        288 (1)
Part III Device-Specific Libraries                 289 (86)
  Chapter 18 Audio                                 291 (14)
    Introducing Audio                              292 (1)
    Digital Sound Files                            292 (2)
    Music on the Arduino                           294 (1)
    Arduino Due                                    294 (4)
      Digital to Analog Converters                 295 (1)
      Digital Audio to Analog                      295 (1)
      Creating Digital Audio                       296 (1)
      Storing Digital Audio                        296 (1)
      Playing Digital Audio                        296 (2)
    Example Program                                298 (6)
      Hardware                                     298 (2)
      Sketch                                       300 (3)
      Exercise                                     303 (1)
    Summary                                        304 (1)
  Chapter 19 Scheduler                             305 (16)
    Introducing Scheduling                         306 (1)
    Arduino Multitasking                           307 (1)
    Scheduler                                      308 (5)
      Cooperative Multitasking                     309 (2)
      Noncooperative Functions                     311 (2)
    Example Program                                313 (6)
      Hardware                                     314 (2)
      Sketch                                       316 (3)
      Exercises                                    319 (1)
    Summary                                        319 (2)
  Chapter 20 USBHost                               321 (14)
    Introducing USBHost                            322 (1)
    USB Protocol                                   323 (1)
    USB Devices                                    324 (1)
      Keyboards                                    324 (1)
      Mice                                         325 (1)
      Hubs                                         325 (1)
    Arduino Due                                    325 (2)
    USBHost Library                                327 (3)
      Keyboards                                    327 (2)
      Mice                                         329 (1)
    Example Program                                330 (4)
      Hardware                                     331 (1)
      Source Code                                  332 (2)
    Summary                                        334 (1)
  Chapter 21 Esplora                               335 (10)
    Introducing Esplora                            336 (1)
    The Arduino Esplora Library                    337 (5)
      RGB LED                                      337 (1)
      Sensors                                      338 (1)
      Buttons                                      339 (1)
      Buzzer                                       340 (1)
      TinkerKit                                    341 (1)
      LCD Module                                   342 (1)
    Example Program and Exercises                  342 (2)
    Summary                                        344 (1)
  Chapter 22 Robot                                 345 (16)
    Introducing Robot Library                      346 (2)
    Arduino Robot                                  348 (1)
    Robot Library                                  349 (9)
      Control Board                                350 (7)
        Robotic Controls                           350 (1)
        Sensor Reading                             351 (2)
        Personalizing Your Robot                   353 (1)
        LCD Screen                                 354 (2)
        Music                                      356 (1)
      Motor Board                                  357 (1)
    Example Program and Exercises                  358 (2)
    Summary                                        360 (1)
  Chapter 23 Bridge                                361 (14)
    Introducing Bridge Library                     362 (1)
    Bridge                                         363 (6)
      Process                                      364 (2)
      FileIO                                       366 (1)
      YunServer                                    367 (1)
      YunClient                                    368 (1)
    Example Application                            369 (4)
      Hardware                                     369 (1)
      Sketch                                       370 (3)
      Exercises                                    373 (1)
    Summary                                        373 (2)
Part IV User Libraries and Shields                 375 (54)
  Chapter 24 Importing Third-Party Libraries       377 (14)
    Libraries                                      378 (6)
      Finding Libraries                            378 (1)
      Importing a Library                          379 (2)
      Using an External Library                    381 (3)
    Example Application                            384 (5)
    Exercises                                      389 (1)
    Summary                                        389 (2)
  Chapter 25 Creating Your Own Shield              391 (14)
    Creating a Shield                              391 (3)
      The Idea                                     392 (1)
      The Required Hardware                        392 (1)
      The Required Software                        393 (1)
    Your First Shield                              394 (10)
      Step 1: The Breadboard                       395 (3)
      Step 2: The Schematic                        398 (4)
      Step 3: The PCB                              402 (2)
    Summary                                        404 (1)
  Chapter 26 Creating Your Own Library             405 (24)
    Libraries                                      405 (13)
      Library Basics                               406 (1)
      Simple Libraries                             406 (4)
      Advanced Libraries                           410 (3)
      Adding Comments                              413 (2)
      Adding Examples                              415 (1)
      Read Me                                      415 (1)
      Coding Style                                 416 (1)
        Use CamelCase                              416 (1)
        Use English Words                          416 (1)
        Don't Use External Libraries               417 (1)
        Use Standard Names                         417 (1)
      Distributing Your Library                    417 (1)
      Closed Source Libraries                      417 (1)
    Example Library                                418 (10)
      The Library                                  418 (6)
      Examples                                     424 (3)
      README                                       427 (1)
      Finishing Touches                            428 (1)
    Summary                                        428 (1)
Index                                              429
 

 

关闭


版权所有:西安交通大学图书馆      设计与制作:西安交通大学数据与信息中心  
地址:陕西省西安市碑林区咸宁西路28号     邮编710049

推荐使用IE9以上浏览器、谷歌、搜狗、360浏览器;推荐分辨率1360*768以上