You are previewing Getting Started with Arduino, 2nd Edition.
O'Reilly logo
Getting Started with Arduino, 2nd Edition

Book Description

Get a thorough introduction to the open-source electronics prototyping platform that's takien the design and hobbyist world by storm. Updated to cover the latest Arduino hardware, the second edition of Getting Started with Arduino gives you lots of ideas for projects and helps you get going on them right away. To use the introductory examples in this book, all you need is an Arduino, USB cable, an LED, and some other inexpensive components.

Table of Contents

  1. Getting Started with Arduino
  2. A Note Regarding Supplemental Files
  3. Preface
    1. Acknowledgments
    2. How to Contact Us
  4. 1. Introduction
    1. Intended Audience
    2. What Is Physical Computing?
  5. 2. The Arduino Way
    1. Prototyping
    2. Tinkering
    3. Patching
    4. Circuit Bending
    5. Keyboard Hacks
    6. We Love Junk!
    7. Hacking Toys
    8. Collaboration
  6. 3. The Arduino Platform
    1. The Arduino Hardware
    2. The Software (IDE)
    3. Installing Arduino on Your Computer
    4. Installing Drivers: Macintosh
    5. Installing Drivers: Windows
    6. Port Identification: Macintosh
    7. Port Identification: Windows
  7. 4. Really Getting Started with Arduino
    1. Anatomy of an Interactive Device
    2. Sensors and Actuators
    3. Blinking an LED
    4. Pass Me the Parmesan
    5. Arduino Is Not for Quitters
    6. Real Tinkerers Write Comments
    7. The Code, Step by Step
    8. What We Will Be Building
    9. What Is Electricity?
    10. Using a Pushbutton to Control the LED
    11. How Does This Work?
    12. One Circuit, A Thousand Behaviours
  8. 5. Advanced Input and Output
    1. Trying Out Other On/Off Sensors
    2. Controlling Light with PWM
    3. Use a Light Sensor Instead of the Pushbutton
    4. Analog Input
    5. Try Other Analogue Sensors
    6. Serial Communication
    7. Driving Bigger Loads (Motors, Lamps, and the Like)
    8. Complex Sensors
  9. 6. Talking to the Cloud
    1. Planning
    2. Coding
    3. Assembling the Circuit
    4. Here’s How to Assemble It
  10. 7. Troubleshooting
    1. Testing the Board
    2. Testing Your Breadboarded Circuit
    3. Isolating Problems
    4. Problems with the IDE
    5. How to Get Help Online
  11. A. The Breadboard
  12. B. Reading Resistors and Capacitors
  13. C. Arduino Quick Reference
    1. Structure
    2. Special Symbols
      1. ; (semicolon)
      2. {} (curly braces)
      3. Comments
    3. Constants
    4. Variables
      1. boolean
      2. char
      3. byte
      4. int
      5. unsigned int
      6. long
      7. unsigned long
      8. float
      9. double
      10. string
      11. array
    5. Control Structures
      1. if … else
      2. for
      3. switch case
      4. while
      5. do … while
      6. break
      7. continue
      8. return
    6. Arithmetic and Formulas
    7. Comparison Operators
    8. Boolean Operators
    9. Compound Operators
      1. increment and decrement (–– and ++)
      2. += , –=, *= and /=
    10. Input and Output Functions
      1. pinMode(pin, mode)
      2. digitalWrite(pin, value)
      3. int digitalRead(pin)
      4. int analogRead(pin)
      5. analogWrite(pin, value)
      6. shiftOut(dataPin, clockPin, bitOrder, value)
      7. unsigned long pulseIn(pin, value)
    11. Time Functions
      1. unsigned long millis()
      2. delay(ms)
      3. delayMicroseconds(us)
    12. Math Functions
      1. min(x, y)
      2. max(x, y)
      3. abs(x)
      4. constrain(x, a, b)
      5. map(value, fromLow, fromHigh, toLow, toHigh)
      6. double pow(base, exponent)
      7. double sqrt(x)
      8. double sin(rad)
      9. double cos(rad)
      10. double tan(rad)
    13. Random Number Functions
      1. randomSeed(seed)
      2. long random(max) long random(min, max)
    14. Serial Communication
      1. Serial.begin(speed)
      2. Serial.print(data) Serial.print(data, encoding)
      3. Serial.println(data) Serial.println(data, encoding)
      4. int Serial.available()
      5. int Serial.read()
      6. Serial.flush()
  14. D. Reading Schematic Diagrams
  15. Index
  16. About the Author
  17. Copyright