ENGLISH

Arduino Sketches: Tools and Techniques for Programming Wizardry

Book information

Publisher
Wiley
Year
2015
ISBN
1118919602, 9781118919606
Language
english
Format
PDF
Filesize
123 MB (128593424 bytes)
Edition
1
Pages
480\478
Time added
2022-11-24 10:25:35

Description

Master programming Arduino with this hands-on guide Arduino Sketches is a practical guide to programming the increasingly popular microcontroller that brings gadgets to life. Accessible to tech-lovers at any level, this book provides expert instruction on Arduino programming and hands-on practice to test your skills. You'll find coverage of the various Arduino boards, detailed explanations of each standard library, and guidance on creating libraries from scratch – plus practical examples that demonstrate the everyday use of the skills you're learning. Work on increasingly advanced programming projects, and gain more control as you learn about hardware-specific libraries and how to build your own. Take full advantage of the Arduino API, and learn the tips and tricks that will broaden your skillset. The Arduino development board comes with an embedded processor and sockets that allow you to quickly attach peripherals without tools or solders. It's easy to build, easy to program, and requires no specialized hardware. For the hobbyist, it's a dream come true – especially as the popularity of this open-source project inspires even the major tech companies to develop compatible products. Arduino Sketches is a practical, comprehensive guide to getting the most out of your Arduino setup. You'll learn to: Communicate through Ethernet, WiFi, USB, Firmata, and XbeeFind, import, and update user libraries, and learn to create your ownMaster the Arduino Due, Esplora, Yun, and Robot boards for enhanced communication, signal-sending, and peripheralsPlay audio files, send keystrokes to a computer, control LED and cursor movement, and more This book presents the Arduino fundamentals in a way that helps you apply future additions to the Arduino language, providing a great foundation in this rapidly-growing project. If you're looking to explore Arduino programming, Arduino Sketches is the toolbox you need to get started. Cover Title Page Copyright Contents Introduction Overview of the Book and Technology How This Book Is Organized Who Should Read This Book Tools You Need What’s on the Website Summary Part I Introduction to Arduino Chapter 1 Introduction to Arduino Atmel AVR The Arduino Project The ATmega Series The ATmega Series The ATtiny Series Other Series The Different Arduinos Arduino Uno Arduino Leonardo Arduino Ethernet Arduino Mega 2560 Arduino Mini Arduino Micro Arduino Due LilyPad Arduino Arduino Pro Arduino Robot Arduino Esplora Arduino Yún Arduino Tre Arduino Zero Your Own Arduino? Shields What Is a Shield? The Different Shields Arduino Motor Shield Arduino Wireless SD Shield Arduino Ethernet Shield Arduino WiFi Shield Arduino GSM Shield Your Own Shield What Can You Do with an Arduino? What You Will Need for This Book Summary Chapter 2 Programming for the Arduino Installing Your Environment Downloading the Software Running the Software Using Your Own IDE Your First Program Understanding Your First Sketch Programming Basics Variables and Data Types Control Structures if Statement switch Case while Loop for Loop Functions Libraries Summary Chapter 3 Electronics Basics Electronics 101 Voltage, Amperage, and Resistance Voltage Amperage Resistance Ohm’s Law The Basic Components Resistors Different Resistor Values Identifying Resistor Values Using Resistors Capacitors Using Capacitors Diodes Different Types of Diodes Using Diodes Light-Emitting Diodes Using LEDs Transistors Using Transistors Breadboards Inputs and Outputs Connecting a Light-Emitting Diode Calculation Software Hardware What Now? Summary Part II Standard Libraries Chapter 4 The Arduino Language I/O Functions Digital I/O pinMode() digitalRead() digitalWrite() Analog I/O analogRead() analogWrite() Generating Audio Tones tone() noTone() Reading Pulses pulseIn() Time Functions delay() delayMicroseconds() millis() micros() Mathematical Functions min() max() constrain() abs() map() pow() sqrt() random() Trigonometry sin() cos() tan() Constants Interrupts attachInterrupt() detachInterrupt() noInterrupts() interrupts() Summary Chapter 5 Serial Communication Introducing Serial Communication UART Communications Baud Rate Data Bits Parity Stop Bits Debugging and Output Starting a Serial Connection Writing Data Sending Text Sending Data Reading Data Starting Communications Is Data Waiting? Reading a Byte Reading Multiple Bytes Taking a Peek Parsing Data Cleaning Up Example Program SoftwareSerial Summary Chapter 6 EEPROM Introducing EEPROM The Different Memories on Arduino The EEPROM Library Reading and Writing Bytes Reading and Writing Bits Reading and Writing Strings Reading and Writing Other Values Example Program Preparing EEPROM Storage Adding Nonvolatile Memory Summary Chapter 7 SPI Introducting SPI SPI Bus Comparison to RS-232 Configuration Communications Arduino SPI SPI Library SPI on the Arduino Due Example Program Hardware Sketch Exercises Summary Chapter 8 Wire Introducing Wire Connecting I2C I2C Protocol Address Communication Communicating Master Communications Sending Information Requesting Information Slave Communications Receiving Information Sending Information Example Program Exercises Traps and Pitfalls Voltage Difference Bus Speed Shields with I2C Summary Chapter 9 Ethernet Introduction Ethernet Ethernet Cables Switches and Hubs PoE TCP/IP MAC Address IP Address DNS Port Ethernet on Arduino Importing the Ethernet Library Starting Ethernet Arduino as a Client Sending and Receiving Data Connecting to a Web Server Example Program Arduino as a Server Serving Web Pages Example Program Sketch Summary Chapter 10 WiFi Introduction The WiFi Protocol Topology Network Parameters Channels Encryption SSID RSSI Arduino WiFi Importing the Library Initialization Status Scanning Networks Connecting and Configuring Wireless Client Wireless Server Example Application Hardware Sketch Exercises Summary Chapter 11 LiquidCrystal Introduction LiquidCrystal Library Writing Text Cursor Commands Text Orientation Scrolling Custom Text Example Program Hardware Software Exercises Summary Chapter 12 SD Introduction SD Cards Capacity Speed Using SD Cards with Arduino Accepted SD Cards Limitations The SD Library Importing the Library Connecting a Card Opening and Closing Files Reading and Writing Files Reading Files Writing Files Folder Operations Card Operations Advanced Usage Example Program and Sketch Summary Chapter 13 TFT Introduction Technologies TFT Library Initialization Screen Preparation Text Operations Basic Graphics Coloring Graphic Images Example Application Hardware Sketch Exercises Summary Chapter 14 Servo Introduction to Servo Motors Controlling Servo Motors Connecting a Servo Motor Moving Servo Motors Disconnecting Precision and Safety Example Application Schematic Sketch Exercises Summary Chapter 15 Stepper Introducing Motors Controlling a Stepper Motor Hardware Unipolar Versus Bipolar Stepper Motors The Stepper Library Example Project Hardware Sketch Summary Chapter 16 Firmata Introducing Firmata Firmata Library Sending Messages Receiving Messages Callbacks SysEx Example Program Summary Chapter 17 GSM Introducing GSM Mobile Data Network GSM GPRS EDGE 3 G 4 G and the Future Modems Arduino and GSM Arduino GSM Library GSM Class SMS Class VoiceCall Class GPRS Modem Example Application Summary Part III Device-Specific Libraries Chapter 18 Audio Introducing Audio Digital Sound Files Music on the Arduino Arduino Due Digital to Analog Converters Digital Audio to Analog Creating Digital Audio Storing Digital Audio Playing Digital Audio Example Program Hardware Sketch Exercise Summary Chapter 19 Scheduler Introducing Scheduling Arduino Multitasking Scheduler Cooperative Multitasking Noncooperative Functions Example Program Hardware Sketch Exercises Summary Chapter 20 USBHost Introducing USBHost USB Protocol USB Devices Keyboards Mice Hubs Arduino Due USBHost Library Keyboards Mice Example Program Hardware Source Code Summary Chapter 21 Esplora Introducing Esplora The Arduino Esplora Library RGB LED Sensors Buttons Buzzer TinkerKit LCD Module Example Program and Exercises Summary Chapter 22 Robot Introducing Robot Library Arduino Robot Robot Library Control Board Robotic Controls Sensor Reading Personalizing Your Robot LCD Screen Music Motor Board Example Program and Exercises Summary Chapter 23 Bridge Introducing Bridge Library Bridge Process FileIO YunServer YunClient Example Application Hardware Sketch Exercises Summary Part IV User Libraries and Shields Chapter 24 Importing Third-Party Libraries Libraries Finding Libraries Importing a Library Using an External Library Example Application Exercises Summary Chapter 25 Creating Your Own Shield Creating a Shield The Idea The Required Hardware The Required Software Your First Shield Step 1: The Breadboard Step 2: The Schematic Step 3: The PCB Summary Chapter 26 Creating Your Own Library Libraries Library Basics Simple Libraries Advanced Libraries Adding Comments Adding Examples Read Me Coding Style Use CamelCase Use English Words Don’t Use External Libraries Use Standard Names Distributing Your Library Closed Source Libraries Example Library The Library Examples README Finishing Touches Summary Index EULA

Similar books