Cademy logoCademy Marketplace

Course Images

Crazy about Arduino: Your End-to-End Workshop - Level 1

Crazy about Arduino: Your End-to-End Workshop - Level 1

🔥 Limited Time Offer 🔥

Get a 10% discount on your first order when you use this promo code at checkout: MAY24BAN3X

  • 30 Day Money Back Guarantee
  • Completion Certificate
  • 24/7 Technical Support

Highlights

  • On-Demand course

  • 3 hours 8 minutes

  • All levels

Description

Start your journey with the amazing Arduino development platform

The best way to find out whether this course is really for you is by asking yourself a few basic questions: • Do you like building things yourself? • Are you looking for ways to easily combine software and hardware components? • Did you ever wonder how electronic devices really work? • Do you have a creative idea and are just looking for ways to easily prototype it? • Are you excited about monitoring and controlling the physical world with a software program that you created? • Would you like to join the growing worldwide wave of Internet of Things makers? If your answer to most of the questions above is "Yes," then you're in the right place. The Arduino is probably one of the most amazing developments and prototyping platforms today with endless possibilities for Do-It-Yourself hobbyists looking for ways to express their creativity and technical capabilities. It is really up to us: we can build anything from simple and fun projects to very complex autonomous systems that can interact with users and help build a bridge between the physical and the digital world. This course is a starting point and part of a larger comprehensive training program divided into levels that are all about the Arduino and its surrounding ecosystem. Each course covers a specific group of subjects to let you develop and grow your skills step-by-step while enjoying the long journey. All the code and supporting files for this course are available at - https://github.com/PacktPublishing/Crazy-about-Arduino-Your-End-to-End-Workshop---Level-1

What You Will Learn

Understand the Arduino ecosystem
Utilize digital and analog interfaces
Design and review circuits using Fritzing
Wire things together
Build a project with switches, LEDs, resistors, and motion sensors
Learn and use the C language syntax

Audience

This course is for technology innovators, electronics hobbyists, and beginners with a basic knowledge of electronics interested in getting started with the Arduino development platform.

Approach

This complete course, packed with step-by-step instructions, working examples, and helpful advice, is clearly divided into small chunks to help you understand each part individually and learn at your own pace.

Key Features

A complete and well-organized course for Arduino beginners * Build an interesting project with LEDs, switches, and a motion detector * Design and program smart sketch code to run the overall project

Github Repo

https://github.com/packtpublishing/crazy-about-arduino-your-end-to-end-workshop---level-1

About the Author

Idan Gabrieli

Idan Gabrieli has worked in various engineering positions in Israel's high-tech industry. Idan has gained extensive experience with hundreds of business companies, transforming their challenges and opportunities into practical use cases and leveraging cutting-edge technologies. Idan's expertise spans multiple domains, including cloud computing, machine learning, data science, and electronics. Since 2014, Idan has created and published online courses on various topics worldwide. Idan is recognized as a high-rated instructor by leading educational providers. Idan simplifies complex technology and provides high-quality educational content with specific learning objectives that are well-structured, combining various multimedia teaching options.

Course Outline

1. Getting Started

1. Course Introduction

Learn more about the topics covered in this section.

2. What is Arduino?

Arduino is an amazing easy to use development platform that bridge the physical world with the digital world. In this chapter we will learn WHAT is Arduino and WHAT we can do with it?

3. Endless Applications for Makers!

What kind of applications we can build with Arduino? well, there are endless applications we can build with Arduino. Believe it or not, it is really limited by our imagination.... creative people around the world are creating innovative projects with Arduino.

4. Are you ready? Software Checklist

We will need some specific free software tools and of course some small amount of hardware components.

5. Are You Ready? Hardware Checklist

Before starting we need some specific software tools and some small amount of hardware components. So, what do you say, are you ready to start?!


2. Exploring the Arduino Platform

1. Introduction

Learn more about the topics covered in this section.

2. The Arduino Uno Board

Reviewing the Arduino Uno R3 board for Microcontroller, Universal Serial Bus (USB) connector, External power, Reset button, Light-Emitting Diodes (LEDs), labelled L, RX, TX, and ON, Power connections, Analog input, and Digital input and output.

3. Other Arduino Boards

There are many types of Arduino boards available in the market, each with its own design, size and features that can be used to support different applications.

4. Expansion Shields & Modules

Each Arduino board has set of functionalities and based on some project's requirements more options may be needed. In that case two main expansion options are available: Shields or Modules.

5. Arduino IDE

The developing platform for Arduino is called Arduino IDE and it is including code editor, simple mechanism to verify and load programs, monitor the serial port, manage libraries and more. The software we create is called "Sketch" and the language syntax is like C & C++.

6. High Level Board Overview

Video demonstration of the Arduino Uno board, including a high-level overview.

7. Running Our First Program!

In the previous two chapters we saw the Arduino IDE software tool and the Arduino Uno board. Now it is time to combine between them, meaning write some simple sketch, upload it to the board and see some result!


3. Introduction to Arduino Programming

1. Introduction

Learn more about the topics covered in this section.

2. Sketching in Code

"Sketching in code" is all about trying things, letting our creative mind to flow, put less focus in that stage on making our code a perfect piece of art.... and more important build a step-by-step framework around your project.

3. Basic Sketch Structure

Every sketch we will write, or use is usually based on the following basic structure: variables declaration, setup function, loop function and custom functions.

4. Variables Declaration - Why?

In almost all programs, we will probably need to store values, do some calculation, try to access specific pins numbers in Arduino and more. For that we can declare storage location that are called variables.

5. Variables Declaration - Data Types

While declaring a variable, we need to define the variable data type. The Arduino programming language support different very useful data types such as: Boolean, Byte, Char, Integer and more.

6. Variables Declaration - Naming Convention

Some of the names that we may chose may not be the most readable names...., which is why many programmers have adopted certain naming guidelines or conventions.

7. Variable Scope

The location of a variable declaration in a sketch determines where that variable can be used, or what is known as the variable scope. We have two types of variable scope: global variable and local variable.

8. Setup and Loop Functions

setup() is the first function the Arduino program reads, and it runs only once. The second function, loop(), makes it possible for our sketch to run continuously, and it will begins just after the last statement in the setup() function has finished executing.

9. Custom Functions

In programming it is common practice is to divide big tasks to smaller tasks using functions. A function is a block of code that performs a specific task that is repeating in program. Now instead of writing the same code all over again we can just call the function name... isn't that great ;-)?

10. Operators

An operator is a symbol that tells the compiler to perform specific mathematical or logical functions on Arithmetic Operators, Relational Operators, Logical Operators, Bitwise Operators, Assignment Operators and Misc Operators.

11. Control Statements

Control statements enable us to specify the flow of our program. Using them we can make decisions in specific locations, or to perform tasks repeatedly or to jump from one section of code to another one. There are two kinds of statements available in Arduino for controlling program flow such as Conditional statements and Iterative statements.

12. Control Statements: if-else

if-else statement decides whether to execute another statement or decides which of two statements to execute. If (You are Crazy about Arduino == TRUE) {keepLearning(nextChapter);}

13. Control Statements: switch

The switch statement is more complicated version of the if statement as it can execute one or more blocks of code, depending on a range of conditions.

14. Control Statements: for loop

For loop is an iterative statement that allows to repeatedly execute lines of code in a loop a specified number of times.

15. Control Statements: while/do loop

The while statement or while loop, is used to continuously execute a statement so long as specific condition remains true.

16. Using Libraries

One of the greatest things in Arduino development environment is that it provide us an easy access to a very large amount of off-the-shelf ready to use functions that are grouped to libraries.

17. Comments in Code

Comments are used to document what's going on in a program for anyone reading the code and should be used any time we wish to explain what a program or a specific function is supposed to do.


4. Learning by Doing

1. Introduction

Learn more about the topics covered in this section.

2. Our Arduino Project

In the next sections we are going to build our first Arduino project. The project is divided to several steps enabling us to learn each main subject by itself. It will be great! if you will build it also in parallel to the course.

3. Breadboard

In order to build a circuit, we have to connect circuit components together and a great tool for this purpose is the solderless breadboard. A breadboard is a simple prototyping plastic base board that easily allows us to wire up simple circuits without having to solder together parts to a custom printed circuit board.


5. Step 1 - LEDs Test and Animation Wave

1. Introduction

Short introduction to what we are planning to build in Step one.

2. Project Building Blocks

Before running into building the hardware and writing our software, let's review the main building blocks that are needed in this specific step.

3. Wiring LEDs

LEDs are one of the most-used components in many projects and as you probably know, LED stands for light-emitting diode. Like all diode's components, LEDs allow current to flow in only one direction. LEDs are polarized components, meaning we need to carefully connect them in the right direction!

4. Reading Digital Inputs

Reading digital inputs will help us to interact our Arduino with the external environment in real-time. In our case we are going to use very simple digital sensors that are called push buttons. To read the status of a button, we first need to define a specific digital I/O pin as an input and use digitalRead(pin) function, where pin is the digital pin number to read. One thing that is important to add to this circuit is something that is called pull up or pull-down resistors.

5. Pull Up/Down Resistors

The main usage of pull-down resistor is to set the default state of the input pin to 0v. 10k? is a fairly common pull-down resistor value.

6. Circuit Design

Let's review the circuit design for this step using the Fritzing tool. Don't forget that you can download the files templates from the relevant chapter.

7. Project Review: Step-1A

Let's review the hardware setup relevant to this step and the behaviour of the system.

8. Sketching in Code: Step-1A

The Sketch is the software code that we uploaded into the Arduino board. Let's understand the logic and program flow we used in this step.

9. Handling Switch Bouncing

When working with buttons, we cannot just look for the value of the switch to change from low to high as we need to handle a problem that is called switch bouncing. Buttons are mechanical devices that operate much slower than our Arduino system. In other words, when we push a button down, the signal we will read does not just go from low to high, it bounces up and down between those two states for a few milliseconds before it settles.

10. Sketching in Code: Step-1B

The Sketch is the software code that we uploaded into the Arduino board. Let's understand the logic and program flow we used in this step.

11. Project Review: Step-1B

Let's review the hardware setup relevant to this step and the behaviour of the system.


6. Step 2 - Control LEDs Speed and Brightness

1. Introduction

Learn about the topics covered.

2. Project Building Blocks

Before running into building the hardware and writing our software, let's review the main building blocks that are needed in this specific step.

3. The Variable Resistor

In addition to fixed resistors there are also variable resistors or resistors that their resistance can be adjusted by physical rotation. One common type of variable resistor is the potentiometer. The potentiometer has three pin connections: one in the center pin and one on each side. When someone is turning the shaft of a variable resistor, it increases the resistance between one side and the center and decreases the resistance between the center and the opposite side.

4. Circuit Design

Let's review the circuit design for this step using the Fritzing tool. Don't forget that you can download the files templates from the relevant chapter.

5. Reading Analog Inputs

Reading analog inputs will help us to better interact our Arduino with the external environment around us, as many sensors are providing analog output when measuring some property, like distance, temperature, speed, light brightness and much more.

6. Utilizing the Serial Monitor

Serial communication is used by two digital devices to talk to each other and in our case the USB connection is the serial communication protocol. We already used it to upload our source code to the Arduino board. Now, we can use the Serial Monitor included in the Arduino programming environment to actually "see" the values that the Arduino is reading from such external sensors.

7. Setting the LEDs Speed

While using the build-in delay function, "speed" will be measured in milliseconds and the relation is opposite, more delay is less speed. In that case some range normalization or mapping will be needed.

8. Sketching in Code: Step-2A

The Sketch is the software code that we uploaded into the Arduino board. Let's understand the logic and program flow we used in this step.

9. Project Review: Step-2A

Let's review the hardware setup relevant to this step and the behaviour of the system.

10. Writing Analog Output

For setting the LED brightness level we need to output a voltage between 0v and 5v. We can't do it directly in Arduino, but the good news is that we can "get very close". We can generate analog output values by using a method called PWM while using a function called analogWrite().

11. A little bit magic with PWM

PWM (pulse-width modulation) can be used to create the illusion of an LED being ON at different levels of brightness by turning the LED ON and OFF very rapidly, at around 500 cycles per second.

12. Setting the LEDs Brightness

Before using the AnalogWrite() function we need to do some value mapping.

13. Sketching in Code: Step-2B

The Sketch is the software code that we uploaded into the Arduino board. Let's understand the logic and program flow we used in this step.

14. Project Review: Step-2B

Let's review the hardware setup relevant to this step and the behaviour of the system.


7. Step 3 - Motion Detector

1. Introduction

Learn to involve the Motion detector on Arduino.

2. Project Building Blocks

Before running into building the hardware and writing our software, let's review the main building blocks that are needed in this specific step.

3. The PIR Motion Detector

In physics, motion is a change in position of an object with respect to time and its reference point. A PIR sensor is a converter that measure a physical quantity (infrared radiation) and convert it into signal (ON/OFF).

4. Circuit Design

Let's review the circuit design for this step using the Fritzing tool. Don't forget that you can download the files templates from the relevant chapter.

5. Sketching in Code: Step-3

The Sketch is the software code that we uploaded into the Arduino board. Let's understand the logic and program flow we used in this step.

6. Project Review: Step-3

Let's review the hardware setup relevant to this step and the behaviour of the system.


8. Course Summary

1. Almost at the finish line...

You made it !!! :-)

2. What did we covered so far?

Let's see in high level the flow of topics with a short summary per each one and also some recommendations for your next step moving forward!

3. What Next? Level 2!

Thanks for watching the first course in the "Crazy about Arduino" learning program, I hope you enjoyed it while learning one or two things :-)

Course Content

  1. Crazy about Arduino: Your End-to-End Workshop - Level 1

About The Provider

Packt
Packt
Birmingham
Founded in 2004 in Birmingham, UK, Packt’s mission is to help the world put software to work in new ways, through the delivery of effective learning and i...
Read more about Packt

Tags

Reviews