Mastering
Arduino Programming
A Quick Guide to Arduino Programming with Simple Do it yourself Projects
Daniel Stone
Copyright
Daniel Stones
ChurchGate Publishing House
USA | UK | Canada
Churchgate Publishing House 2020
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, and scanning without perm-ission in writing by the author.
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.
Printed in the United States of America
2020 by Daniel Stones
Contents
More Projects To try
DIY Thermal Image
Introduction
What Is Arduino?
Arduino is an open-source electronics creation platform, which is based on free hardware and software. It is flexible and easy to use for creators and developers. This platform allows the creation of different types of single-board micro computers that can be used by the developer community for different types of use.
To understand this concept, you are first going to have to understand the concepts of free hardware and free software. Free hardware is the device whose specifications and diagrams are publicly accessible so that anyone can replicate them. This means that Arduino offers the bases so that any other person or company can create their boards, being able to be different between them but equally functional when starting from the same base.
Free software is computer programs whose code is accessible by anyone so that anyone who wants can use and modify it. Arduino offers the Arduino IDE (Integrated Development Environment) platform, which is a programming environment with which anyone can create applications for Arduino boards so that they can be given all kinds of utilities.
The project was born in 2003, when several students from the Institute of Interactive Design of Ivrea, Italy, tried to facilitate the access and use of electronics and programming. They did it so that electronics students would have a cheaper alternative to the popular BASIC Stamps, plates that were worth more than a hundred dollars at the time, and that not everyone could afford it.
The result was Arduino, a board with all the necessary elements to connect peripherals to the inputs and outputs of a microcontroller and which can be programmed in Windows, macOS, and GNU / Linux. A project that promotes 'learning by doing' philosophy, which means that the best way to learn, is tinkering.
The Arduino is a board that is almost completely dependent on an ATMEL microcontroller. Microcontrollers are integrated circuits in which instructions can be recorded, which you write with the programming language that you can use in the Arduino IDE environment. These instructions allow you to create programs that interact with the circuitry on the board.
The Arduino microcontroller has what is called an input interface, which is a connection in which we can connect different types of peripherals on the board. The information from these peripherals that you connect will be transferred to the microcontroller, which will be in charge of processing the data that comes through them.
The type of peripherals that you can use to send data to the microcontroller largely depends on what use you are considering. They can be cameras to obtain images, keyboards to enter data or different types of sensors.
It also has an output interface, which is responsible for carrying the information that has been processed in the Arduino to other peripherals. These peripherals can be screens or speakers which reproduce the processed data, but they can also be other boards or controllers.
Arduino is a project and not a specific board model, which means that by sharing its basic design you, can find different types of boards. They come in various shapes, sizes, and colors to meet the needs of the project you are working on. There are simple ones or ones with improved features, Arduinos oriented to the Internet of Things or 3D printing and, of course, depending on these characteristics you will find all kinds of prices.
Also, Arduino boards have other types of components called Shields or backpacks. It is a kind of board that is connected to the mainboard to add a myriad of functions, such as GPS, real-time clocks, radio connectivity, LCD touch screens, development boards, and a very long etcetera of elements. There are even stores with sections specialized in these elements.
History of the Arduino project
The Arduino project is the result of a team of teachers and students from the Interaction Design School of Ivrea (Italy). They encountered a major problem during this period (between 2003 - 2004). The tools necessary for the creation of interactivity projects were complex and expensive, somewhere between 80 and 100 euros. These often too high costs made it difficult for the students to develop many projects and this slowed down the concrete implementation of their learning.
Until then, prototyping tools were mainly dedicated to engineering, robotics, and technical fields. They are powerful but their development processes are long and they are difficult to learn and use for artists, interaction designers, and, more generally, for beginners. Their concern then focused on making hardware cheaper and easier to use. They wanted to create an environment close to Processing. This programming language was developed in 2001 by Casey Reas and Ben Fry, two former students of John Maeda at MIT, himself initiator of the DBN project.
In 2003, Hernando Barragan, for his graduation thesis, undertook the development of an electronic board called Wiring, accompanied by a free and open programming environment. For this work, Hernando Barragan reused the sources of the Processing project. Based on an easy-to-access programming language adapted to the development of design projects, the Wiring card, therefore, inspired the Arduino project (2005).
As with Wiring, the objective was to arrive at a device that was simple to use, with low costs. The codes and plans are "free" (that is to say, the sources of which are open and can be modified, improved, and distributed by the users themselves) and multi-platform (independent of the operating system used).
Designed by a team of professors and students (David Mellis, Tom Igoe, Gianluca Martino, David Cuartielles, Massimo Banzi as well as Nicholas Zambetti), the Arduino environment is particularly suited to artistic production as well as the development of designs that can find their achievements in industrial production. The name Arduino originates from the name of the bar the team used to hang out at. Arduino is also the name of an Italian king, a historical figure of the city "Arduind'Ivre", or even a masculine Italian first name which means "strong friend".
The Interaction Design Institute Ivrea (IDII) school is today located in Copenhagen under the name Copenhagen Institute of Interaction Design. Casey Reas was himself a teacher at IVREA, for Processing, at the time.
Why Is The Use Of Arduino Popular?
A software and hardware platform for creating digital objects, Arduino allows you to program electronic circuits that interact with the environment around them. Connected in particular to sound, thermal and motion sensors, these inexpensive electronic circuits, called micro-controllers, can in return generate images, actuate an articulated arm, send messages on the Internet, etc. Tens of thousands of artists, designers, engineers, researchers, teachers, and even companies use it to realize incredible projects in multiple fields: