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

    1. Cover Page
    2. Title Page
    3. Copyright
    4. Dedication
    5. About the Author
    6. About the Technical Editor
    7. Credits
    8. Acknowledgments
    9. Contents at Glance
    10. Contents
    11. Introduction
    12. Part I: Introduction to Arduino
      1. CHAPTER 1: Introduction to Arduino
        1. Atmel AVR
        2. The Arduino Project
        3. The ATmega Series
        4. The Different Arduinos
        5. Shields
        6. What Can You Do with an Arduino?
        7. What You Will Need for This Book
        8. Summary
      2. CHAPTER 2: Programming for the Arduino
        1. Installing Your Environment
        2. Your First Program
        3. Understanding Your First Sketch
        4. Programming Basics
        5. Summary
      3. CHAPTER 3: Electronics Basics
        1. Electronics 101
        2. Voltage, Amperage, and Resistance
        3. The Basic Components
        4. Breadboards
        5. Inputs and Outputs
        6. Connecting a Light-Emitting Diode
        7. Summary
    13. Part II: Standard Libraries
      1. CHAPTER 4: The Arduino Language
        1. I/O Functions
        2. Time Functions
        3. Mathematical Functions
        4. Trigonometry
        5. Interrupts
        6. Summary
      2. CHAPTER 5: Serial Communication
        1. Introducing Serial Communication
        2. UART Communications
        3. Debugging and Output
        4. Starting a Serial Connection
        5. Writing Data
        6. Reading Data
        7. Example Program
        8. SoftwareSerial
        9. Summary
      3. CHAPTER 6: EEPROM
        1. Introducing EEPROM
        2. The Different Memories on Arduino
        3. The EEPROM Library
        4. Preparing EEPROM Storage
        5. Adding Nonvolatile Memory
        6. Summary
      4. CHAPTER 7: SPI
        1. Introducting SPI
        2. SPI Bus
        3. Arduino SPI
        4. SPI Library
        5. SPI on the Arduino Due
        6. Example Program
        7. Summary
      5. CHAPTER 8: Wire
        1. Introducing Wire
        2. Connecting I 2 C
        3. I 2 C Protocol
        4. Communicating
        5. Traps and Pitfalls
        6. Summary
      6. CHAPTER 9: Ethernet
        1. Introduction
        2. Ethernet
        3. TCP/IP
        4. Ethernet on Arduino
        5. Arduino as a Client
        6. Summary
      7. CHAPTER 10: WiFi
        1. Introduction
        2. The WiFi Protocol
        3. Arduino WiFi
        4. Example Application
        5. Summary
      8. CHAPTER 11: LiquidCrystal
        1. Introduction
        2. LiquidCrystal Library
        3. Example Program
        4. Summary
      9. CHAPTER 12: SD
        1. Introduction
        2. SD Cards
        3. Using SD Cards with Arduino
        4. The SD Library
        5. Example Program and Sketch
        6. Summary
      10. CHAPTER 13: TFT
        1. Introduction
        2. Technologies
        3. TFT Library
        4. Example Application
        5. Summary
      11. CHAPTER 14: Servo
        1. Introduction to Servo Motors
        2. Controlling Servo Motors
        3. Example Application
        4. Summary
      12. CHAPTER 15: Stepper
        1. Introducing Motors
        2. Controlling a Stepper Motor
        3. The Stepper Library
        4. Example Project
        5. Summary
      13. CHAPTER 16: Firmata
        1. Introducing Firmata
        2. Firmata Library
        3. Example Program
        4. Summary
      14. CHAPTER 17: GSM
        1. Introducing GSM
        2. Mobile Data Network
        3. Arduino and GSM
        4. Arduino GSM Library
        5. Example Application
        6. Summary
    14. Part III: Device-Specific Libraries
      1. CHAPTER 18: Audio
        1. Introducing Audio
        2. Digital Sound Files
        3. Music on the Arduino
        4. Arduino Due
        5. Example Program
        6. Summary
      2. CHAPTER 19: Scheduler
        1. Introducing Scheduling
        2. Arduino Multitasking
        3. Scheduler
        4. Example Program
        5. Summary
      3. CHAPTER 20: USBHost
        1. Introducing USBHost
        2. USB Protocol
        3. USB Devices
        4. Arduino Due
        5. USBHost Library
        6. Example Program
        7. Summary
      4. CHAPTER 21: Esplora
        1. Introducing Esplora
        2. The Arduino Esplora Library
        3. Example Program and Exercises
        4. Summary
      5. CHAPTER 22: Robot
        1. Introducing Robot Library
        2. Arduino Robot
        3. Robot Library
        4. Example Program and Exercises
        5. Summary
      6. CHAPTER 23: Bridge
        1. Introducing Bridge Library
        2. Bridge
        3. Example Application
        4. Summary
    15. Part IV: User Libraries and Shields
      1. CHAPTER 24: Importing Third-Party Libraries
        1. Libraries
        2. Example Application
        3. Exercises
        4. Summary
      2. CHAPTER 25: Creating Your Own Shield
        1. Creating a Shield
        2. Your First Shield
        3. Summary
      3. CHAPTER 26: Creating Your Own Library
        1. Libraries
        2. Example Library
        3. Summary
    16. Index

    Product information

    • Title: Arduino Sketches: Tools and Techniques for Programming Wizardry
    • Author(s): James A. Langbridge
    • Release date: January 2015
    • Publisher(s): Wiley
    • ISBN: 9781118919606