Arduino Essentials
eBook - ePub

Arduino Essentials

Francis Perea

Condividi libro
  1. 206 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Arduino Essentials

Francis Perea

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Arduino Essentials è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Arduino Essentials di Francis Perea in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Hardware. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2015
ISBN
9781784398569
Categoria
Hardware

Arduino Essentials


Table of Contents

Arduino Essentials
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
Disclaimer
1. Meeting the Arduino Family
A game changer
Common features
Arduino Uno
Arduino Mega 2560
Arduino Ethernet
LilyPad Arduino
Arduino Yún
Arduino Mini, Micro, and Nano
Other Arduino family members
Esplora
Arduino Robot
Arduino Due
Unofficial boards
Shields
Just one to rule them all
Users teaching users
Summary
2. The Arduino Development Environment
A multiplatform tool
Downloading the package
Windows
Mac OS X
Linux
Source code
Installing the software
Windows
Mac OS X
Linux
In case of trouble
Installing the drivers
Windows
Mac OS X
Linux
Running the Arduino development environment for the first time
The toolbar
The code editor
The message area
Preflight checks
Uploading our first sketch
Main menus and commands
The Arduino language
Summary
3. Interacting with the Environment the Digital Way
Digital versus analog signals
Our first circuit
Using a breadboard
The LED circuit
Circuit schematic
Breadboard connections diagram
Asymmetric blinking code
C language syntax considerations
Troubleshooting faults in the circuit
Dealing with multiple outputs
Current limit per pin
Summary
4. Controlling Outputs Softly with Analog Outputs
Dealing with analog signals
The analog output circuit
Connections diagram
Analog control through code
The analogWrite() function
The for loop
Complete the fading LED code
Motor control with a transistor
Motor driver
Power source considerations
The complete circuit
Connections diagram
Motor varying speed code
The assembled circuit
Bigger power motors
Summary
5. Sensing the Real World through Digital Inputs
Sensing by using inputs
Connecting a button as a digital input
The momentary push button
Complete circuit schematic
Breadboard connections diagram
Writing code to react to a press
Configuring and reading a digital input
Taking decisions with conditional bifurcations
Timing and debouncing
Other types of digital sensors
Using an optocoupler as a coin detector
The schematic of the coin detector
The breadboard connections diagram
The complete example code
A real working project
Summary
6. Analog Inputs to Feel Between All and Nothing
Sensing analog values
The Arduino map function
An ambient light meter
Connecting a variable resistor to Arduino
Voltage divider
An ambient light meter circuit
Breadboard connections
Programming to sense the light
An ambient light meter code
The switch / case control structure
Calibrating the sensor
DC motor speed control revisited
The potentiometer
The motor speed control schematic
The breadboard connections diagram
A simple code to control the motor speed
Summary
7. Managing the Time Domain
Time control functions
Stopping versus accounting
Making some noise
Arduino library sound functions
Sound hardware connection
Direct connection
Connection through a transistor
A simple timer
Dividing your sketch into different files
Coding a timer by using delays
Coding without delays and blinking an LED while waiting
A bigger project – a metronome
The metronome circuit
The metronome code
Summary
8. Communicating with Others
Serial communications concepts
The baud rate
Other types of serial communication
Calibrating sensors serially
Sending data to Arduino
A computer connected dial thermometer
The thermometer circuit
The code for the thermometer
Summary
9. Dealing with Interrupts
The concept of an interruption
The ISR
The tachograph project
Mechanical considerations
A simple interrupt tester
Our first interrupt and its ISR
A dial tachograph
Breadboard connections diagram
The complete tachograph code
Modular development
Summary
10. Arduino in a Real Case – Greenhouse Control
A greenhouse controller
The controller requirements
Modular design
Temperature control
Humidity control
Lighting control
Manual alarm
Input and output devices
The relay as a mediator
The greenhouse controller circuit
Breadboard connections diagram
The greenhouse controller code
Libraries and constant definitions
Global variables
The interrupt ISR
The alarm routine
Initialization and board configuration
The main execution loop
Temperature subsystem
Humidity subsystem
Lighting subsystem
Alarm subsystem
Serial feedback and calibration
The complete project code
Final considerations
Summary
Index

Arduino Essentials

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: February 2015
Production reference: 1200215
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-856-9
www.packtpub.com

Credits

Author
Francis Perea
Reviewers
Ladislas de Toldi
Ken Leung
Commissioning Editor
Sarah Crofton
Acquisition Editor
Meeta Rajani
Content Development Editor
Ajinkya Paranjpe
Technical Editor
Sebastian Rodrigues
Copy Editors
Nithya P
Stuti Srivastava
Project Coordinator
Harshal Ved
Proofreaders
Maria Gould
Jonathan Todd
Bernadette Watkins
Indexer
Monica Ajmera Mehta
Production Coordinator
Shantanu N. Zagade
Cover Work
Shantanu N. Zagade

About the Author

Francis P...

Indice dei contenuti