Contents

About the Author

About the Technical Reviewer

Acknowledgments

Introduction

imagesChapter 1: Getting Started

Arduino is for Makers

The Arduino Ecosystem

The Arduino Platform

Open-Source Hardware

Community

Arduinoland

Arduino is C… Mostly

What’s Needed

Getting Up and Running

Installing the Software

Connecting the Arduino

Opening a Sketch

Selecting the Board and Serial Port

Uploading a Sketch

Summary

imagesChapter 2: Sketching in Code

What is Sketching in Code?

Project 1: RGB Blink

Hooking It Up

Uploading the Source Code

Source Code Summary

The Structure of Arduino C

Using Comments

Basic Functions

Statements and Syntax

Verifying and Uploading

Verifying

Saving

Uploading

Common Errors

Summary

imagesChapter 3: Working with Variables

Project 2: 7-Color Blink

Hooking It Up

Uploading the Source Code

Source Code Summary

What’s a Variable?

Declaring Variables

Variable Names

Data Types

Variable Qualifiers

Predefined Constants

Variable Scope

Using Operators

Arithmetic Operators: +, -, *, /

Compound Operators: ++, --, +=, -=, *=, /=

Order of Operations

Summary

imagesChapter 4: Making Decisions

Project 3: Tilt Blink

Hooking It Up

Uploading the Source Code

Source Code Summary

Comparative and Logical Operators

Control Statements

If

For

While

Do

Switch

Break

Continue

Summary

imagesChapter 5: Digital Ins and Outs

Arduino I/O Demystified

Project 4: Noisy Cricket

Hooking It Up

Uploading the Source Code

Source Code Summary

Digital Functions

pinMode()

digitalWrite()

digitalRead()

State Changes

Toggle

Counting

Modality

Summary

imagesChapter 6: Analog In, Analog Out

Analog Demystified

Project 5: Telematic Breath

Hooking It Up

Uploading the Source Code

Source Code Summary

Analog Functions

analogRead()

analogWrite()

analogReference()

Analog Serial Monitor

Reading Analog Values

Using the Serial Monitor

How It Works

Mapping Values

map()

constrain()

Summary

imagesChapter 7: Advanced Functions

Timing Functions

delay()

delayMicroseconds()

millis()

micros()

Random Functions

random()

randomSeed()

Project 6: Ambient Temps

Hooking It Up

Uploading the Source Code

Source Code Summary

Writing Functions

Declaring Functions

Calling Functions

Function Returns

Function Parameters

Project 7: HSB Color Mixer

Hooking It Up

Uploading the Source Code

Source Code Summary

Hardware Interrupts

attachInterrupt()

detachInterrupt()

Summary

imagesChapter 8: Arrays and Memory

Project 8: Decision Machine

Hooking It Up

Uploading the Source Code

Source Code Summary

Arrays

Declaring Arrays

Using Arrays

Character Arrays

Multidimensional Arrays

Arduino Memory

Checking Free RAM

Using Program Memory

Using EEPROM

Summary

imagesChapter 9: Hardware Libraries

Using Libraries

Creating an Instance

Initializing the Library

LiquidCrystal library

Example Code: Arduino Haiku

LiquidCrystal()

begin()

print()

clear()

setCursor()

Example Code: Symbols and Characters()

write()

createChar()

Example Code: Fish Tank Animation

scrollDisplayLeft() and scrollDisplayRight()

Servo Library

Example Code: Reminder Bell

Servo

attach()

write()

Stepper Library

Example Code: 60-Second Sweep

Stepper

setSpeed()

step()

SD Library

Example Code: SD Logger

File

SD.begin()

SD.open()

close()

write()

print()

Example Code: SD Flicker

available()

read()

Summary

imagesChapter 10: Serial and I2C

Using Hardware Serial

Project 9: Serial to Servo

Hooking It Up

Uploading the Source Code

Source Code Summary

Serial Library

begin()

available()

read()

print()

println()

write()

Project 10: RFID Reader

Hooking It Up

Uploading the Source Code

Source Code Summary

SoftwareSerial Library

SoftwareSerial()

begin()

flush()

strncmp()

Project 11: Serial Time Clock

Hooking It Up

Uploading the Source Code

Source Code Summary

Wire Library

begin()

beginTransmission()

endTransmission()

write()

requestFrom()

read()

Summary

imagesChapter 11: Continuing On

Build More Projects

Bonus Project 1: Make Something Tweet

Bonus Project 2: Make Something Move

Bonus Project 3: Mega-Size Something

Learn Another Language

Firmata

Processing

PureData

Contribute to the Community

Participate in Online Forums

Publish Your Project

Summary

imagesChapter 12: Beginning Electronics

Basic Electronics

Circuits

Electricity

Common Components

Resistors

Capacitors

Diodes

Transistors

Switches

Motors

Reading Schematics

Prototyping

Breadboards

Soldering

Summary

imagesAppendix: Resources

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.39.74