Essentials of Arduino™ Boards Programming: Step-by-Step Guide to Master Arduino Boards Hardware and Software 1st Edition Farzin Asadi instant download
Essentials of Arduino™ Boards Programming: Step-by-Step Guide to Master Arduino Boards Hardware and Software 1st Edition Farzin Asadi instant download
https://ebookmass.com/product/roblox-lua-scripting-essentials-a-step-
by-step-guide-1st-edition-coutinho/
https://ebookmass.com/product/python-programming-3-books-
in-1-ultimate-beginners-intermediate-advanced-guide-to-learn-python-
step-by-step/
College Admission Essentials: A Step-by-Step Guide to
Showing Colleges Who You Are and What Matters to You Ethan
Sawyer
https://ebookmass.com/product/college-admission-essentials-a-step-by-
step-guide-to-showing-colleges-who-you-are-and-what-matters-to-you-
ethan-sawyer-2/
https://ebookmass.com/product/kubernetes-fundamentals-a-step-by-step-
development-and-interview-guide-1st-edition-himanshu-agrawal/
https://ebookmass.com/product/kubernetes-fundamentals-a-step-by-step-
development-and-interview-guide-1st-edition-himanshu-agrawal-2/
Essentials of
Arduino™ Boards
Programming
Step-by-Step Guide to
Master Arduino Boards Hardware
and Software
—
Farzin Asadi
Maker Innovations Series
Jump start your path to discovery with the Apress Maker Innovations
series! From the basics of electricity and components through to the most
advanced options in robotics and Machine Learning, you’ll forge a path to
building ingenious hardware and controlling it with cutting-edge software.
All while gaining new skills and experience with common toolsets you can
take to new projects or even into a whole new career.
The Apress Maker Innovations series offers projects-based learning,
while keeping theory and best processes front and center. So you get
hands-on experience while also learning the terms of the trade and how
entrepreneurs, inventors, and engineers think through creating and
executing hardware projects. You can learn to design circuits, program AI,
create IoT systems for your home or even city, and so much more!
Whether you’re a beginning hobbyist or a seasoned entrepreneur
working out of your basement or garage, you’ll scale up your skillset to
become a hardware design and engineering pro. And often using low-
cost and open-source software such as the Raspberry Pi, Arduino, PIC
microcontroller, and Robot Operating System (ROS). Programmers and
software engineers have great opportunities to learn, too, as many projects
and control environments are based in popular languages and operating
systems, such as Python and Linux.
If you want to build a robot, set up a smart home, tackle assembling a
weather-ready meteorology system, or create a brand-new circuit using
breadboards and circuit design software, this series has all that and more!
Written by creative and seasoned Makers, every book in the series tackles
both tested and leading-edge approaches and technologies for bringing
your visions and projects to life.
Farzin Asadi
Essentials of Arduino™ Boards Programming: Step-by-Step Guide to Master
Arduino Boards Hardware and Software
Farzin Asadi
Department of Electrical and Electronics Engineering, Maltepe University,
Istanbul, Türkiye
ISBN-13 (pbk): 978-1-4842-9599-1 ISBN-13 (electronic): 978-1-4842-9600-4
https://doi.org/10.1007/978-1-4842-9600-4
Copyright © 2023 by Farzin Asadi
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or
part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way,
and transmission or information storage and retrieval, electronic adaptation, computer software,
or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Miriam Haidara
Development Editor: James Markham
Coordinating Editor: Jessica Vakili
Cover image designed by eStudioCalamar
Distributed to the book trade worldwide by Apress Media, LLC, 1 New York Plaza, New York, NY
10004, U.S.A. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected],
or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member
(owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance
Inc is a Delaware corporation.
For information on translations, please e-mail [email protected]; for
reprint, paperback, or audio rights, please e-mail [email protected].
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Print
and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is
available to readers on GitHub (https://github.com/Apress). For more detailed information,
please visit http://www.apress.com/source-code.
Paper in this product is recyclable
Dedicated to my lovely brother, Farzad, and my lovely
sisters, Farnaz and Farzaneh.
Table of Contents
About the Author�������������������������������������������������������������������������������xiii
Introduction��������������������������������������������������������������������������������������xvii
vii
Table of Contents
viii
Table of Contents
ix
Table of Contents
x
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
Table of Contents
xi
Table of Contents
Index�������������������������������������������������������������������������������������������������327
xii
About the Author
Farzin Asadi received his BSc in Electronics
Engineering, MSc in Control Engineering, and
PhD in Mechatronics Engineering.
Currently, he is with the Department of
Electrical and Electronics Engineering at
Maltepe University, Istanbul, Turkey.
Dr. Asadi has published more than 40 papers
in ISI/Scopus indexed journals. He has written 25
books. His research interests include switching
converters, control theory, robust control of
power electronics converters, and robotics.
xiii
About the Technical Reviewer
Hai Van Pham received his BSc, MSc, and PhD
in Computer Science.
Currently, he is with the School of
Information and Communication Technology,
Hanoi University of Science and Technology,
Hanoi, Vietnam.
Dr. Pham has published over 100 papers in
ISI/Scopus indexed journals. He is an associate
editor in domestic and international journals
and served as chair and technical committee
member of many national and international
conferences including SOICT 2014, KSE 2015, KSE 2017, KSE 2019, KSE
2021, and KSE 2022.
His research interests include artificial intelligence, knowledge-based
systems, big data, soft computing, rule-based systems, and fuzzy systems.
xv
Introduction
Arduino is an open source hardware and software company, project,
and user community that designs and manufactures single-board
microcontrollers and microcontroller kits for building digital devices.
Arduino boards use a variety of microcontrollers, and each board is
suitable for a specific application. For instance, Arduino Nano or Pro Mini
is an ideal option if space or weight is important for you. If you search for
a board with many input/output (I/O) pins, then Arduino MEGA is a good
option for you. If you need an Arduino board for a time-critical application
like a robot control, then Arduino DUE is a good choice. Arduino UNO is a
good option for educational purposes. All of the examples in this book are
done with Arduino UNO.
There exist many other development boards in the world, but why are
Arduino boards so famous with millions of users? Here are some of the
basic reasons that make Arduino boards outstanding:
xvii
Introduction
xviii
Introduction
xix
CHAPTER 1
Introduction
to Arduino Boards
1.1 Introduction
Arduino is an open source platform used for building electronics projects.
Arduino consists of both a physical programmable circuit board (often
referred to as a microcontroller) and a piece of software or IDE (Integrated
Development Environment) that runs on your computer, used to write and
upload computer code to the physical board.
The Arduino platform has become quite popular with people just
starting out with electronics, and for good reason. Unlike most previous
programmable circuit boards, the Arduino does not need a separate piece
of hardware (called a programmer) in order to load new code onto the
board; you can simply use a USB cable. Additionally, the Arduino IDE uses
a simplified version of C++, making it easier to learn to program. Finally,
Arduino provides a standard form factor that breaks out the functions of
the microcontroller into a more accessible package.
This chapter is an introduction to microcontrollers and Arduino
boards and makes the foundation for other chapters.
1.2 Microcontrollers
A microcontroller is a compact integrated circuit designed to govern a specific
operation in an embedded system. A typical microcontroller includes a
processor, memory, and input/output (I/O) peripherals on a single chip.
Some of the commonly used microcontrollers are shown in Figures 1-1 to 1-3.
3
Visit https://ebookmass.com today to explore
a vast collection of ebooks across various
genres, available in popular formats like
PDF, EPUB, and MOBI, fully compatible with
all devices. Enjoy a seamless reading
experience and effortlessly download high-
quality materials in just a few simple steps.
Plus, don’t miss out on exciting offers that
let you access a wealth of knowledge at the
best prices!
Exploring the Variety of Random
Documents with Different Content
— Hyvä neiti — kuiskasi Milada — melkein peloissaan astuen
askeleen edemmäksi — älkää huutako noin! Älkää usuttako tuota
kintereillemme! —
Miller kalpeni… Tämä on, tämä on, — hän sopersi — kuinka teillä
on sydäntä saattaa minut — minut tällaiseen…
— Minä teen kaupan omalla rahallani, hyvä neiti, jos niin haluatte,
ja minä voitan sillä. — — —
*****
— Niin siksi, että olet kana. Miten luulet voivasi mitään elämässäsi
saavuttaa, mistä arvosta on sinulle jokin kaukaisempi tahi
läheisempikin tarkoitusperä, jos et tiedä, mikä on elämäsi päämaali?
— Miten voit heittäytyä seikkailuihin, antautua keinotteluyrityksiin,
miten voit heittäytyä olemassaolon kuohuvaan mahdollisuuksien
mereen, jos et ole varma siitä, että sinun yritysten ja keinottelujen
kuluttama ruumiisi — kaatuu — ja saa varman tyyssijan?! Et tunne
vielä, mikä merkitys on yksilölle hautuumaapaikan asema, minkä
arvoinen on ylhäisten sukujen perhehautakammio, — miten
yksityisten toivo saada komea arkku, saa heidät yrittämään
sankaritöitä! — Se antaa elämälle voimaa ja lentoa. — Sinä, jolla on
mielikuvitusta, joka tahdot käydä mailmanmullistajasta, hae itsellesi
ensin vankka maa-alue, jos ei muuta, niin kolme kyynärää! — Jos
sinulla ei ole edes se oma, ei sinun tahdollasi ole tarmoa, — sinun
kunnianhimollasi ei ole uskaliaisuutta, — sinun päätelmilläsi ei ole —
selkärankaa. Paras tehtävä, minkä olen voinut sinulle keksiä… totta
tosiaan, en jaksa seurata kehitystäsi, — olen väsynyt. — Milada
katsahti Horneriin. — Hornerin kasvot olivat entistään
turvonneemmat, kalpeammat ja levottomammat. — Hänen tuuheat
kulmakarvansa, joita hän rypisti ankarasti, peittivät puoleksi
tuijottavat kovin pienentyneet silmäterät. — Milada tunsi tuon
ilmeen.
Horner räjähti:
— Tyhmä hanhi! Kaikki ovet ovat sinulle auki. Nyt voit vasta alkaa
elää! — Vasta silloin, kun ihminen on voittanut kuolemanpelon, niin
perinpohjin, että sitä voi kohdella veljenään, silloin vasta voi nauttia
vapaasti elämästä! Nyt voit toimia! Tee mitä haluat, heitä hiiteen
Punatalon emäntä, rupea siveyssaarnaajaksi, ompelijattareksi tahi
markkinoiden nuorallatanssijaksi! Osta itsellesi kolme uutta paitaa ja
ryhdy pitämään omaa tyttöliikettä, yhdentekevää! Nyt on sinulla
onnen lipas kädessä. — Avaa se! —
Milada seisoi ikkunan ääressä. Hänestä tuntui, kuin olisi tuo kapea
Punatalokatu laajennut vihreäksi aukeaksi nurmeksi. Kalpean,
kaarevan taivaan alla näki hän rivin mustia kumpuja. Yksi niistä oli
hänen oma hautansa.
Milada pudisti päätään… Niin kauvan saan olla neidin luona kuin
neiti tarvitsee minua. Mihinkä sitten joudun, kun sairastun?…
— Tässä liikkeessä olen pian kulunut, niin etten jaksa yrittää enää
muualla. Ja lisäksi minua säälittää tämän liikkeen nolous, että tahdon
ryhtyä johonkin toiseen toimeen… Onhan minulla rahaa… Syntyi
vaitiolo jolloin Millerin silmät kauhusta mustenivat… Osaanhan minä
hoitaa taloutta, jatkoi Milada. Joko minä perustan itse tällaisen
liikkeen tai menen minä teatteriin, — niinkuin Gisi. Ja pääsenhän
minä naimisiinkin, kunhan olen täältä vapaa.
Miller istui mykkänä tuijottaen avaruuteen. — Nyt oli siis kaikki
kuitti, loistava kapitalistinen yritys joutuisi tuuliajolle, keksivän älyn
puutteessa. Tämä olisi ihanaa! Toinen menee naimisiin, toinen
kuolee, toinen rupeaa tanssijattareksi. Kaikkien muiden on mukava
olla, mitenkä hänen sitte käy?
ebookmasss.com