Search Tutorials

Arduino Workshop for Beginners

By
Sam on
04 June 2017

Welcome to the Arduino Workshop, where you'll be able to follow our guided course which covers everything you'll need to know in order to create your own Arduino projects and become a leveled up maker. My name is Sam and along with being a maker myself, I also enjoy teaching others how to use different technology and create amazing projects. Along with the course videos themselves, you can find all of the related course material such as code examples, circuit diagrams, images, and other resources.

We'll be working with Arduino so you'll need an Arduino board to follow this course. We'll be introducing many different concepts including working with various types of hardware such as sensors, displays, and general electronics components, and the kit we're using for all of this is the Sparkfun Inventors Kit. If you are not in Australia, you can grab from Sparkfun directly and have it shipped to you almost anywhere in the world.

Course Goals:

Understand what an Arduino is and how it works

Learn how to use an Arduino safely

Program your Arduino using code that you've written in the Arduino IDE (Integrated Development Environment)

Learn programming concepts using C and C++ along with Arduino specific programming

Understand best practice concepts for programming and prototyping

Use a wide variety of hardware and components and prototype your projects using a breadboard

Build your own innovative project with Arduino

When you're ready, let's begin the Arduino Workshop!

If you run into any issues throughout this workshop, then please reach out to us on our forum. We're full-time makers and are here to help.

Chapter 1: Introduction to Arduino

1.0 Chapter Overview

In this chapter you'll learn about:

What is Arduino

Different types of Arduino boards

How does the Arduino Uno board work and why it's so popular

What is a microcontroller

How to use the Arduino IDE (Integrated Development Environment)

Powering and connecting your Arduino to your computer

Uploading programs to your Arduino board

By the end of this chapter, you will have uploaded your first program to your Arduino board to control an LED.

1.1 What is Arduino?

In this section, we look at what is Arduino, what it's good for makers, and some of the different types of Arduino boards available.

Section Resources:

Example Arduino Uno Variations

1.2 What is a Microcontroller?

In this section, we'll be looking at what is a microcontroller (the chip at the heart of any Arduino board), an overview of how they work, and how it integrates with the Arduino environment.

1.3 The Arduino Uno

In this section, you'll learn about the features and capabilities of the Arduino Uno board, how the layout of the board can affect your project, and why the Uno is such a great all-rounder.

1.4 Arduino IDE and the Language

In this section, we'll take a look at the Arduino IDE, which is where you write the code for your Arduino, upload it, and communicate with your board. We'll also cover the programming language that Arduino IDE uses, and where to download it.

1.5 Powering and Connecting Your Arduino

In this section, you'll be learning about the various ways to power your Arduino, and how to connect it up to your computer for uploading your programs, and communicating to the computer using the serial port.

Section Resources:

Arduino Power Layout

1.6 Hello World Example

In the final section of this chapter, we'll talk through using the Arduino IDE to upload your first program to your Arduino board.

5.0 Chapter Overview

Expanding your project with the Arduino hardware format called 'Shields'

5.1 Using and Including Libraries

In this section, we'll be looking at using code modules called 'libraries' which can be used to simplify complex applications.

Section Resources:

Arduino Library Reference Page

Here, you can find Arduino's information page regarding libraries which cover some of the changes for including and adding libraries with different revisions of the Arduino IDE.

5.2 Using SPI

In this section, you'll learn how to use the SPI interface to send and receive serial data for interfacing with sensors and other devices.

Section Resources:

Arduino SPI Port

Source Code for 'SPI LED Shift Register'

#include
int slaveSelect = 2;
int delayTime = 50;
void setup() {
pinMode(slaveSelect, OUTPUT);
SPI.begin();
SPI.setBitOrder(LSBFIRST);
}
void loop() {
for (int i; i < 256; i++) //For loop to set data = 0 then increase it by one for every iteration of the loop, when the counter reaches the condition (256) it will be reset
{
digitalWrite(slaveSelect, LOW); //Write our Slave select low to enable the SHift register to begin listening for data
SPI.transfer(i); //Transfer the 8-bit value of data to shift register, remembering that the least significant bit goes first
digitalWrite(slaveSelect, HIGH); //Once the transfer is complete, set the latch back to high to stop the shift register listening for data
delay(delayTime); //Delay
}
}

Wiring Diagram for 'SPI LED Shift Register'

5.3 Using I2C

In this section, you'll look at using the I2C interface to send and receive serial data for interfacing with sensors and other devices.