You are previewing Arduino: A Technical Reference.
O'Reilly logo
Arduino: A Technical Reference

Book Description

Rather than yet another project-based workbook, Arduino: A Technical Reference is a reference and handbook that thoroughly describes the electrical and performance aspects of an Arduino board and its software.

This book brings together in one place all the information you need to get something done with Arduino. It will save you from endless web searches and digging through translations of datasheets or notes in project-based texts to find the information that corresponds to your own particular setup and question.

Table of Contents

  1. Preface
    1. Intended Audience
    2. What This Book Is
    3. What This Book Is Not
    4. About Terminology
    5. What’s in This Book
    6. Endorsements
    7. Conventions Used in This Book
    8. Safari® Books Online
    9. How to Contact Us
    10. Acknowledgments
  2. 1. The Arduino Family
    1. A Brief History
    2. Types of Arduino Devices
    3. Arduino Galleries
    4. Arduino-Compatible Devices
      1. Hardware-Compatible Devices
      2. Software-Compatible Devices
    5. The Arduino Naming Convention
    6. What Can You Do with an Arduino?
    7. For More Information
  3. 2. The AVR Microcontroller
    1. Background
    2. Internal Architecture
    3. Internal Memory
    4. Peripheral Functions
      1. Control Registers
      2. Digital I/O Ports
      3. 8-Bit Timer/Counters
      4. 16-Bit Timer/Counters
      5. Timer/Counter Prescaler
    5. Analog Comparator
    6. Analog-to-Digital Converter
    7. Serial I/O
      1. USART
      2. SPI
      3. TWI
    8. Interrupts
    9. Watchdog Timer
    10. Electrical Characteristics
    11. For More Information
  4. 3. Arduino-Specific AVR Microcontrollers
    1. ATmega168/328
      1. Memory
      2. Features
      3. Packages
      4. Ports
      5. Pin Functions
      6. Analog Comparator Inputs
      7. Analog Inputs
      8. Serial Interfaces
      9. Timer/Clock I/O
      10. External Interrupts
      11. Arduino Pin Assignments
      12. Basic Electrical Characteristics
    2. ATmega1280/ATmega2560
      1. Memory
      2. Features
      3. Packages
      4. Ports
      5. Pin Functions
      6. Analog Comparator Inputs
      7. Analog Inputs
      8. Serial Interfaces
      9. Timer/Clock I/O
      10. External Interrupts
      11. Arduino Pin Assignments
      12. Electrical Characteristics
    3. ATmega32U4
      1. Memory
      2. Features
      3. Packages
      4. Ports
      5. Pin Functions
      6. Analog Comparator Inputs
      7. Analog Inputs
      8. Serial Interfaces
      9. Timer/Clock I/O
      10. External Interrupts
      11. USB 2.0 Interface
      12. Electrical Characteristics
      13. Arduino Pin Assignments
    4. Fuse Bits
    5. For More Information
  5. 4. Arduino Technical Details
    1. Arduino Features and Capabilities
    2. Arduino USB Interfaces
    3. Arduino Physical Dimensions
      1. Full-Size Baseline Arduino PCB Types
      2. Mega Form-Factor Arduino PCB Types
      3. Small Form-Factor Arduino PCB Types
      4. Special-Purpose PCB Types
    4. Arduino Pinout Configurations
      1. The Baseline Arduino Pin Layout
      2. The Extended Baseline Pin Layout
      3. The Mega Pin Layout
      4. Nonstandard Layouts
    5. For More Information
  6. 5. Programming the Arduino and AVR Microcontrollers
    1. Cross-Compiling for Microcontrollers
    2. Bootloaders
    3. The Arduino IDE Environment
      1. Installing the Arduino IDE
      2. Configuring the Arduino IDE
    4. Cross-Compiling with the Arduino IDE
      1. The Arduino Executable Image
      2. The Arduino Software Build Process
      3. Sketch Tabs
      4. Arduino Software Architecture
      5. Runtime Support: The main() Function
      6. An Example Sketch
      7. Constants
      8. Global Variables
    5. Libraries
      1. Using Libraries in Sketches
      2. Adding a Library to the Arduino IDE
      3. Creating Custom Libraries
    6. Arduino Source Code
  7. 6. Life Without the Arduino IDE
    1. IDE Alternatives
      1. PlatformIO
      2. Ino
    2. The AVR Toolchain
      1. Installing the Toolchain
      2. make
      3. avr-gcc
      4. binutils
      5. avr-libc
    3. Building C or C++ Programs from Scratch
      1. Compiling with avr-gcc or avr-g++
      2. Multiple Source Files and make
    4. AVR Assembly Language
      1. The AVR Programming Model
      2. Creating AVR Assembly Language Programs
      3. AVR Assembly Language Resources
    5. Uploading AVR Executable Code
      1. In-System Programming
      2. Programming with the Bootloader
      3. Uploading Without the Bootloader
      4. JTAG
      5. AVRDUDE
      6. Using an Arduino as an ISP
      7. Bootloader Operation
      8. Replacing the Bootloader
    6. Summary
  8. 7. Arduino Libraries
    1. Library Components
    2. Contributed Libraries
  9. 8. Shields
    1. Electrical Characteristics of Shields
    2. Physical Characteristics of Shields
    3. Stacking Shields
    4. Common Arduino Shields
      1. Input/Output
      2. I/O Extension Shields
      3. I/O Expansion Shields
      4. Relay Shields
      5. Signal Routing Shields
      6. Memory
      7. Communication
      8. Serial I/O and MIDI
      9. Ethernet
      10. Bluetooth
      11. USB
      12. ZigBee
      13. CAN
      14. Prototyping
      15. Creating a Custom Prototype Shield
      16. Motion Control
      17. DC and Stepper Motor Control
      18. PWM and Servo Control
      19. Displays
      20. Instrumentation Shields
      21. Adapter Shields
      22. Miscellaneous Shields
    5. Uncommon Arduino Shields
    6. Sources
  10. 9. Modules and I/O Components
    1. Modules
      1. Physical Form Factors
      2. Interfaces
      3. Module Sources
      4. Module Descriptions
    2. Grove Modules
    3. Sensor and Module Descriptions
    4. Sensors
      1. Temperature, Humidity, and Pressure Sensors
      2. Tilt Sensors
      3. Audio Sensors
      4. Light Sensors
      5. Magnetic Sensors
      6. Vibration and Shock Sensors
      7. Motion Sensors
      8. Contact and Position Sensors
      9. Range Sensors
    5. Communications
      1. APC220 Wireless Modules
      2. 315/433 MHz RF Modules
      3. ESP8266 Transceiver
    6. Output Devices and Components
      1. Light Sources
      2. Relays, Motors, and Servos
      3. Analog Signal Outputs
    7. User Input
      1. Keypads
      2. Joysticks
      3. Potentiometers and Rotary Encoders
    8. User Output
      1. Text Displays
      2. Graphical Displays
    9. Support Functions
      1. Clocks
      2. Timers
    10. Connections
      1. Working with Naked Jumper Wires
      2. Module Connection Systems
      3. Building Custom Connectors
      4. Choosing a Connection Method
    11. Sources
    12. Summary
  11. 10. Creating Custom Components
    1. Getting Started
    2. Custom Shields
      1. Physical Considerations
      2. Stacking Shields
      3. Electrical Considerations
    3. The GreenShield Custom Shield
      1. Objectives
      2. Definition and Planning
      3. Design
      4. Prototype
      5. Final Software
      6. Fabrication
      7. Final Acceptance Testing
      8. Operation
      9. Next Steps
    4. Custom Arduino-Compatible Designs
      1. Programming a Custom Design
    5. The Switchinator
      1. Definition and Planning
      2. Design
      3. Prototype
      4. Software
      5. Fabrication
      6. Acceptance Testing
      7. Next Steps
    6. Resources
  12. 11. Project: A Programmable Signal Generator
    1. Project Objectives
    2. Definition and Planning
    3. Design
      1. Functionality
      2. Enclosure
      3. Schematic
    4. Prototype
      1. Control Inputs and Modes
      2. Display Output
      3. DDS Module
    5. Software
      1. Source Code Organization
      2. Software Description
      3. The DDS Library
      4. Testing
    6. Final Assembly
      1. Pull-up Resistor Array
      2. Input Protection
      3. Chassis Components
      4. DC Power
    7. Final Testing and Closing
    8. Reducing the Cost
    9. Cost Breakdown
    10. Resources
  13. 12. Project: Smart Thermostat
    1. Background
      1. HVAC Overview
      2. Temperature Control Basics
      3. Smart Temperature Control
    2. Project Objectives
    3. Definition and Planning
    4. Design
      1. Functionality
      2. Enclosure
      3. Schematic
      4. Software
      5. User Input/Output
      6. Control Output
    5. Prototype
      1. DHT22 Sensor
      2. Rotary Encoder
      3. Real-Time Clock Module
      4. LCD Shield
    6. Software
      1. Source Code Organization
      2. Software Description
      3. Testing
    7. Final Version
      1. Assembly
      2. Testing and Operation
    8. Cost Breakdown
    9. Next Steps
    10. Resources
  14. 13. Model Rocket Launcher: A Design Study
    1. Overview
    2. The Design Cycle
    3. Objectives
    4. Selecting and Defining Functional Requirements
    5. Creating the Preliminary Design
      1. Design Feasibility
      2. Preliminary Parts List
    6. Prototype
    7. Final Design
      1. Electrical
      2. Physical
      3. Software
      4. Testing and Operation
    8. Cost Analysis
  15. A. Tools and Accessories
    1. Hand Tools
      1. Screwdrivers
      2. Pliers and Cutters
      3. Wire Strippers
      4. Connector Crimping Tools
      5. Saws
    2. Power Tools
      1. Drills
      2. Miniature Grinder
      3. Miniature Drill Press
    3. Soldering
      1. Soldering Irons
      2. Soldering Accessories
    4. Tool Sources
  16. B. AVR ATmega Control Registers
    1. ATmega168/328
    2. ATmega1280/2560
    3. ATmega32U4
  17. C. Arduino and Compatible Products Vendors
    1. Arduino Products
      1. Hardware-Compatible Boards and Shields
      2. Software-Compatible Boards
      3. Sensors, Add-on Boards, and Modules
    2. Electronics Software
      1. Open Source Schematic Capture Tools
      2. CAE Software Tools
      3. PCB Layout Tools
    3. Hardware, Components, and Tools
      1. Electronic Component Manufacturers
      2. Electronics Distributors (USA)
      3. Discount and Surplus Electronics
      4. Mechanical Parts and Hardware (Screws, Nuts, Bolts)
      5. Electronic Enclosures and Chassis
      6. Tools
      7. Test Equipment
    4. Printed Circuit Board Supplies and Fabricators
      1. Prototype and Fast-Turnaround Fabricators
      2. PCB Kit Sources
    5. Other Sources
  18. D. Recommended Reading
    1. Arduino
    2. AVR
    3. C and C++ Programming
    4. General Electronics
    5. Interfaces
    6. Instrumentation
    7. Printed Circuit Boards
  19. E. Arduino and AVR Software Development Tools
    1. Compilers/Assemblers
    2. Integrated Development Environments (IDEs)
    3. Programming Tools
    4. Simulators
  20. Index