Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Programming Arduino™ Next Steps
About the Author
Title Page
Copyright Page
Contents at a Glance
Contents
Acknowledgments
Introduction
1. Programming Arduino
What Is Arduino?
Installation and the IDE
Installing the IDE
Blink
A Tour of Arduino
Power Supply
Power Connections
Analog Inputs
Digital Connections
Arduino Boards
Uno and Similar
Big Arduino Boards
Small Arduino Boards
LilyPad and LilyPad USB Boards
Unofficial Arduinos
Programming Language
Modifying the Blink Sketch
Variables
If
Loops
Functions
Digital Inputs
Digital Outputs
The Serial Monitor
Arrays and Strings
Analog Inputs
Analog Outputs
Using Libraries
Arduino Data Types
Arduino Commands
Summary
2. Under the Hood
A Brief History of Arduino
Anatomy of an Arduino
AVR Processors
ATmega328
ATmega32u4
ATmega2560
AT91SAM3X8E
Arduino and Wiring
From Sketch to Arduino
AVR Studio
Installing a Bootloader
Burning a Bootloader with AVR Studio and a Programmer
Burning a Bootloader with the Arduino IDE and a Second Arduino
Summary
3. Interrupts and Timers
Hardware Interrupts
Interrupt Pins
Interrupt Modes
Enabling Internal Pull-Up
Interrupt Service Routines
Volatile Variables
ISR Summary
Enabling and Disabling Interrupts
Timer Interrupts
Summary
4. Making Arduino Faster
How Fast Is an Arduino?
Comparing Arduino Boards
Speeding Up Arithmetic
Do You Really Need to Use a Float?
Lookup vs. Calculate
Fast I/O
Basic Code Optimization
Bytes and Bits
ATmega328 Ports
Very Fast Digital Output
Fast Digital Input
Speeding Up Analog Inputs
Summary
5. Low Power Arduino
Power Consumption of Arduino Boards
Current and Batteries
Reducing the Clock Speed
Turning Things Off
Sleeping
Narcoleptic
Waking on External Interrupts
Use Digital Outputs to Control Power
Summary
6. Memory
Arduino Memory
Minimizing RAM Usage
Use the Right Data Structures
Be Careful with Recursion
Store String Constants in Flash Memory
Common Misconceptions
Measure Free Memory
Minimizing Flash Usage
Use Constants
Remove Unwanted Trace
Bypass the Bootloader
Static vs. Dynamic Memory Allocation
Strings
C char Arrays
The Arduino String Object Library
Using EEPROM
EEPROM Example
Using the avr/eeprom.h Library
EEPROM Limitations
Using Flash
Using SD Card Storage
Summary
7. Using I2C
I2C Hardware
The I2C Protocol
The Wire Library
Initializing I2C
Master Sending Data
Master Receiving Data
I2C Examples
TEA5767 FM Radio
Arduino-to-Arduino Communication
LED Backpack Boards
DS1307 Real-Time Clock
Summary
8. Interfacing with 1-Wire Devices
1-Wire Hardware
The 1-Wire Protocol
The OneWire Library
Initializing 1-Wire
Scanning the Bus
Using the DS18B20
Summary
9. Interfacing with SPI Devices
Bit Manipulation
Binary and Hex
Masking Bits
Shifting Bits
SPI Hardware
The SPI Protocol
The SPI Library
SPI Example
Summary
10. Serial UART Programming
Serial Hardware
Serial Protocol
The Serial Commands
The SoftwareSerial Library
Serial Examples
Computer to Arduino over USB
Arduino to Arduino
GPS Module
Summary
11. USB Programming
Keyboard and Mouse Emulation
Keyboard Emulation
Keyboard Emulation Example
Mouse Emulation
Mouse Emulation Example
USB Host Programming
USB Host Shield and Library
USB Host on the Arduino Due
Summary
12. Network Programming
Networking Hardware
Ethernet Shield
Arduino Ethernet/EtherTen
Arduino and WiFi
The Ethernet Library
Making a Connection
Setting Up a Web Server
Making Requests
Ethernet Examples
Physical Web Server
Using a JSON Web Service
The WiFi Library
Making a Connection
WiFi Specific Functions
WiFi Example
Summary
13. Digital Signal Processing
Introducing Digital Signal Processing
Averaging Readings
An Introduction to Filtering
Creating a Simple Low-Pass Filter
Arduino Uno DSP
Arduino Due DSP
Filter Code Generation
The Fourier Transform
Spectrum Analyzer Example
Frequency Measurement Example
Summary
14. Managing with One Process
Making the Transition from Big Programming
Why You Don’t Need Threads
Setup and Loop
Sense Then Act
Pause Without Blocking
The Timer Library
Summary
15. Writing Libraries
When to Make a Library
Using Classes and Methods
Library Example (TEA5767 Radio)
Define the API
Write the Header File
Write the Implementation File
Write the Keywords File
Make the Examples Folder
Testing the Library
Releasing the Library
Summary
A: Parts
Arduino Boards
Shields
Components and Modules
Suppliers
Index
Also from author Simon Monk
← Prev
Back
Next →
← Prev
Back
Next →