Introduction to Arduino Programming 2020 Fall

Jump to navigation Jump to search

Arduino is an open-source electronics platform based on easy-to-use hardware and software. Arduino boards are able to read inputs - light on a sensor, a finger on a button, or a Twitter message - and turn it into an output - activating a motor, turning on an LED, publishing something online.

Arduino is widely used in STEM education, and in the introduction to computer programming. With some small components, children can program in C++ computer language to create some small projects.

This course is for beginner which shows from the first step, and covers some basic Arduino projects. After this course, participant will understand Arduino Digital and Analog pins, control the input and output devices, and control servo motor. This will prepare them for more advance project such as Robotic Arm, RC car, ...
Move Course details to separate page: Introduction to Arduino Programming 2020 Fall Course Details

Meetings / Sessions

First week

Unit Title Details Remark
1 Introduction to Arduino Uno History, Arduino board, Application
2 Install Arduino Uno Acrylic Case Just setup the Acrylic Case
3 Bread Board Explained N/A
Using Small Bread Board Connect LED and explain Ohm's Law
Electronic symbols The common symbols diagram
4 Arduino IDE

Explain C programming

Arduino project 1 Use IDE to load Blink sample program to Arduino Uno.
Explain: what is a circuit?
Connect one LED to Pin13 or different Pin.

Second week

Unit Title Details Remark
5 Continue:
Explain C programming

Explaining: #define, variable, and scope. The following program does not need any part, only USB cable connecting to IDE.

6 Continue:
Explain C programming
Connect to 2 push buttons to control Pin 13 build-in LED.

Reuse 3 LED Traffic Light program to explain C program statement

  1. Counter, and If-Then-Else
  2. Use serial monitor debugging

C Statement: If, else if, else; and switch case default

  1. If, else if, else statements
  2. switch, case, default statments

Combine 3 LED and 1 Push Button to explain Why we need different programming style?

The example programs zip file

Third week

Unit Title Details Remark
7 Basic

Resistor Color Code

In your kit, you should have five 10K Ohm, five 1K Ohm, and five 470 Ohm resistors. Ohm is resistor's unit.

  • 10K Ohm resistor color code is Brown, Black, Orange
  • 1K Ohm resistor color code is Brown, Black, Red
  • 470 Ohm resistor color code is Yellow, Violet, Brown
C Programming
Arduino project 2

Connect a speaker to play music, and using a push-button to control it.

Download program:
Create a NEW Arduino program, copy and paste from the following file, Save-AS Speaker_Theme_Song_Button. The new directory will be created with the same name.

Display this header file, save it as pitches.h in that new Speaker_Theme_Song_Button directory.

Just for reference: The original play music YouTube video:

DIY Understanding Pulse-width modulation (PWM)
Using IDE Serial plotter to see the data pattern

Using Plotter to see data

Digital vs Analog
8 Arduino project 3 & 4

Fourth week

Unit Title Details Remark
9 Arduino project 5
10 Arduino project 6
11 Arduino project 7
12 Arduino project 8
Arduino Program Cheat Sheet PDF file

Fifth week

Unit Title Details Remark
13 Bonus project

Arduino Pro connects ws2812b Strip

Fading RBG LED

WS2812b RGB LED Strip

Just for reference

14 What Arduino can and cannot do?

What are the alternative or better solutions?

What do you want with these SoC?

  • RC toy, robotic arm, full house automation, colourful LED display; or create your own toy, invention, even start a new business venture?

Let me introduce [ Internet Of Things (IoT) ] to you.

Please fill-in this [ survey ] form.