You are previewing Beginning Arduino Programming.
O'Reilly logo
Beginning Arduino Programming

Book Description

Beginning Arduino Programming provides a clear introduction to writing Arduino code, building your skills with Arduino through a series of well-designed hardware and software building blocks. Once you have read this book, you'll be ready to program Arduino in exactly the ways you want for your future projects.

Beginning Arduino Programming lets you discover new journeys with your Arduino board through programming. While everyone knows that Arduino is a platform for hardware hackers—be they engineers, artist or maker-enthusiasts—your Arduino board cannot function without code. This book will show you the fundamentals of programming and how to program your Arduino board to do the things you want it to do.

You'll learn from first principles the core Arduino programming language, examining how to program loops, variables, arrays, and functions. While these features are common to many languages, you'll also learn how they are used specifically for Arduino. Beginning Arduino Programming uses the sketching analogy, which means you'll find yourself writing snippets of code that do interesting things very quickly. You'll also learn how to code in a good, succinct Arduino style that other programmers will respect.

As you read Beginning Arduino Programming, you'll learn how to make your Arduino code talk directly to the chips and sensors on your boards, taking into account pulse width, timing and sensor characteristics, all under your control. You'll then be ready to discover the joys of the existing Arduino open source libraries, so you can benefit from the code that other people have already created, and even think about sharing your own Arduino code projects in the future.

Table of Contents

  1. Title
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewer
  7. Acknowledgments
  8. Introduction
    1. Who This Book is For
    2. Reading This Book
    3. Downloading the Code
  9. Chapter 1: Getting Started
    1. Arduino is for Makers
    2. The Arduino Ecosystem
    3. Arduino is C… Mostly
    4. What’s Needed
    5. Getting Up and Running
    6. Summary
  10. Chapter 2: Sketching in Code
    1. What is Sketching in Code?
    2. Project 1: RGB Blink
    3. The Structure of Arduino C
    4. Verifying and Uploading
    5. Summary
  11. Chapter 3: Working with Variables
    1. Project 2: 7-Color Blink
    2. What’s a Variable?
    3. Using Operators
    4. Summary
  12. Chapter 4: Making Decisions
    1. Project 3: Tilt Blink
    2. Comparative and Logical Operators
    3. Control Statements
    4. Summary
  13. Chapter 5: Digital Ins and Outs
    1. Arduino I/O Demystified
    2. Project 4: Noisy Cricket
    3. Digital Functions
    4. State Changes
    5. Summary
  14. Chapter 6: Analog In, Analog Out
    1. Analog Demystified
    2. Project 5: Telematic Breath
    3. Analog Functions
    4. Analog Serial Monitor
    5. Mapping Values
    6. Summary
  15. Chapter 7: Advanced Functions
    1. Timing Functions
    2. Random Functions
    3. Project 6: Ambient Temps
    4. Writing Functions
    5. Project 7: HSB Color Mixer
    6. Hardware Interrupts
    7. Summary
  16. Chapter 8: Arrays and Memory
    1. Project 8: Decision Machine
    2. Arrays
    3. Arduino Memory
    4. Summary
  17. Chapter 9: Hardware Libraries
    1. Using Libraries
    2. LiquidCrystal library
    3. Servo Library
    4. Stepper Library
    5. SD Library
    6. Summary
  18. Chapter 10: Serial and I2C
    1. Using Hardware Serial
    2. Project 9: Serial to Servo
    3. Serial Library
    4. Project 10: RFID Reader
    5. SoftwareSerial Library
    6. Project 11: Serial Time Clock
    7. Wire Library
    8. Summary
  19. Chapter 11: Continuing On
    1. Build More Projects
    2. Learn Another Language
    3. Contribute to the Community
    4. Summary
  20. Chapter 12: Beginning Electronics
    1. Basic Electronics
    2. Common Components
    3. Reading Schematics
    4. Prototyping
    5. Soldering
    6. Summary
  21. Appendix: Resources
    1. Additional Resources
    2. Selected Suppliers
    3. Parts Used in This Book
  22. Index