ARDUINO
PROGRAMMING
CRASH COURSE
FOR BEGINNERS TO PRO
A step-by-step Practical guide to Arduino Microcontroller Projects
Roger Edward
Copyright
Copyright2020 Roger Edward
All rights reserved. No part of this book may be reproduced or used in any manner without the prior written permission of the copyright owner, except for the use of brief quotations in a book review.
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.
Printed on acid-free paper.
Table of Contents
INTRODUCTION TO ARDUINO
The Arduino system is develops with various types of equipment, allowing the user to fully perceive and control the physical world more than a desktop computer. Arduino allows the computer to go beyond the virtual world into the physical and interact with it.
Arduino is an open-source physical computing outlet based on a series of single-chip circuit boards, a software development environment for Arduino and Genuine development boards, and a community of active developers and users. Arduino-based devices can receive information about the environment through various sensors, and can also control various actuators.
With the Arduino you can improve interesting active objects, receive input from different switches or sensors, and control various lights, motors, and other physical output devices. The Arduino project can be run alone or in conjunction with the software (Processing, MaxMSP) running on your computer.
You can manually assemble a simple development board or buy a pre-installed complete development board. Afterward, download the open-source Arduino Software (IDE) for free.
Arduino uses wiring as its programming language. Arduino uses a physical computing dais to process its program and multimedia environment. Through years of hard work, the software (IDE) component of an Arduino program has evolved to support many core boards and development boards manufactured by corporations such as Intel and Samsung.
You can load a program into the Arduino processor that will control all these devices according to a given algorithm. Thus, you can create an endless number of unique cool gadgets made by yourself and according to your idea.
To understand the general idea of an Arduino board, view the illustration closely. Although it does not reflect even a millionth share possibility of the Arduino board, it still gives a primary idea.
You will notice a microcontroller on the board; this component utilizes or carries out the programmed language of the Arduino software, i.e., the Wiring language. The microcontroller also aids in the Arduino development environment. An Arduino device can perform its function independently or cooperate with the software program from the monitor.
The boards can be bought and arranged, or still, you can buy the board and its component already arranged. As earlier emphasized, you can download the IDE (Arduino software) for free. The original schematic drawings (CAD files) are publicly available; users can apply them as they wish.
What is Arduino for?
Arduino was created to teach students and schoolchildren electrical engineering, programming, radio electronics, automation systems. With the help of microcontrollers, you can make not only educational projects but also really useful devices. Arduino creates automation projects, smart home devices, portable weather stations, robotic arms, and many other useful devices.
Arduino's primary goal is training. It is very exciting for children to study if they can immediately apply new knowledge in practice, and even see and touch the fruits of their labors. It is much more interesting to learn by experimenting rather than listening to dry theory.
What is a Microcontroller?
The microcontroller is the backbone of every Arduino board. Apart from the microcontroller, the several components on the board are concerned with providing the board with power and allowing it to communicate with your system or computer.
A microcontroller is popularly known as a small computer on-chip. It has everything and more than the first home computers had. The microcontroller contains a processor, a kilobyte or two of random-access memory (RAM) for saving data, a few kilobytes of erasable programmable read-only memory (EPROM) or flash memory for holding your programs. The microcontroller also possesses an input and output pins to perform other function.
The function of the input and output (I/O) pins are to link the microcontroller to the other components of your electronics in Arduino. The inputs pin can read or interpret both digital and analog plugs. With this, users can link the different sensors to their Arduino board.
The outputs can also be analog or digital. So, you can set a pin to be on or off (0 volts or 5 volts), and this can turn light-emitting diodes (LEDs) on and off directly, or you can use the output to control higher-power devices such as motors. They can also provide an analog output voltage.
That is, you can set the output of a pin to some particular voltage, allowing you to control the speed of a motor or the brightness of a light, rather than simply turning it on or off. The microcontroller is that component that contains the 28-pin chip fitted into a socket at the center of the Arduino hardware. This single-chip contains the memory processor and all the electronics for the input/output pins.
The different companies that manufacture microcontroller produce dozens of different microcontrollers grouped into different families. Some microcontrollers produced are deeply inserted into consumer products, like cars, washing machines, DVD players, etc.
CHAPTER ONE
BASIC CONCEPT OF ARDUINO
Physical Computing
Physical Computing uses electronics to model new materials for designers and artists. It involves designing and utilizing interactive objects to transmit messages to humans using sensors and actuators. It is usually controlled by instructions from the software program running inside the microcontroller. They are usually referred to as a minor processor on a single chip.
Centuries ago, using electronics meant having to confront engineers most of the time, and building circuits one small component gradually; these issues kept creative people from playing around with the medium directly. It was indeed difficult for the ordinary user because using electronics requires a degree in electronics or an extensive knowledge of how the electronic device works.
In recent years, microcontrollers have become cheaper and easier to use, allowing the creation of better tools. The progress that we have made with Arduino is to bring these tools one step closer to the novice, allowing people to start building stuff after only two or three days of a workshop.
The Arduino board and software makes it very easy and simple for people without prior knowledge of computer engineering to operate. People can now design and build any device of choice with the Arduino board without spending any extra funds.
What is an Arduino
Arduino, as earlier said, is an open-source programmable circuit board that can be unified with other projects that are either simple or complex. The hardware component of the Arduino contains a microcontroller that can be programmed to sense and control objects in the physical world.