Top Banner
UNO EDITION Fun with Arduino AN INTRODUCTION TO EMBEDDED SYSTEMs
28

Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Dec 16, 2018

Download

Documents

vuthuy
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

UNO EDITION

Fun with ArduinoAN INTRODUCTION TO EMBEDDED SYSTEMs

Page 2: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Hi there and welcome! My name is UNO and I will be your personal assistant

throughout this course! Below are some of the projects we will be building

today!

1. Strobe Light

2. Running LEDs

3. Musical Touch

4. Musical Violin

2

Page 3: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Piezo Buzzer

Buzzer slide switch USB Micro B Connector

RESET

Programmable button

Analog Input

Power Supply Digital IN/OUT

Microcontroller

Place your MAKER UNO on

the outline

3

Page 4: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Gain XP points by collecting stickers from

your instructor for every project completed

within the time given

50 XP points

Hardware

4

Page 5: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Software

Your mission is to gather more than 300 XP points

to UPGRADE yourself into a Young Maker!

5

Page 6: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Horizontal holes are linked together

Vertical holes are linked together too! but not across

the divider

Do you know how the name ‘breadboard’ came about?

6

Page 7: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

The higher the resistance, the

lower the current. That’s why the

LED gets dimmer!

Voltage 9 V

Resistance 220 Ω Resistance 1000 Ω

Voltage (V) = Current (A) x Resistance (Ω)

Current0.027 A

Current0.006 A

DimmerBrighter

Voltage 9 V

7

Page 8: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Rounded side (‘+’ Positive)

Flat side(‘-’ Negative)

Shorter lead (‘-’ Negative)

Longer lead (‘+’ Positive)

Remember! The LED won’t light

up if the polarity is reversed!

8

Page 9: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Step 1:

Turn on your laptop and connect your MAKER UNO, look for Arduino IDE icon and double click on it

Raise your hand if you have any questions!

9

Page 10: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Step 2:

Select File > New

10

Page 11: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Step 3:

Select Tools > Board > Arduino/Genuino Uno

Before programming the MAKER UNO, you have to select the correct ‘Board’

11

Page 12: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Step 4:

Select Tools > Port > COM ‘#’, where ‘#’ can be any number

Can’t find COM10? Don’t worry! The COM port

always appears in different numbers! Pick the one that

appears on your screen

12

Page 13: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

CONGRATULATIONS! YOU HAVE LEARNED HOW

TO CONFIGURE YOUR MAKER UNO ALL BY YOURSELF!

HERE IS 50 XP TO GET YOU STARTED!

Turn to next page to start your mission..

Serious face

ARE YOU READY??

13

Page 14: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Hardware

Shorter leg is negative -ve terminal

Red Red Brown or 220 Ω

Light up an LED using digital output...

14

Page 15: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Software

Click to upload

50 XP points

Try changing different ‘delay’ values and observe the behaviour of the LED

15

Page 16: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

HardwareHold it! Do not

remove the circuit from Project 1!

Just add two more LEDs to your

existing circuit

Light up the LED in sequence...

16

Page 17: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Software

1 2

Upload code no.1, then try code no.2, do you see any difference?

100 XP points17

Page 18: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Hardware

Don’t forget to turn on the

buzzer switch

Play musical tones by touching the pencil lead...

Brown blackgreen or 1MΩ

18

Page 19: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Software

100 XP points

You can play different tones

by changing tone(8, 262) to tone(8, 294).. Give it a try!

19

Page 20: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Hardware

Create a violin using a DC motor...

Once you’ve uploaded your code, spin the fan blade and

see what happens!

20

Page 21: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Software

75 XP points

Serial MonitorHere’s a tip! Use the ‘Serial Monitor’ to view how high the value can go when you spin the

fan blades

21

Page 22: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

1. How to use a Breadboard

2. How to light up LEDs in sequence

3. How to code using ‘for loop’ and ‘if.. else’ statements

4. How to build an electronic instrument using capacitive

sensor

22

Page 23: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

CONGRATULATIONS!YOU HAVE COMPLETED

THE COURSE!

YOU HAVE NOW GAINED THE SKILLS NEEDED TO EXPLORE ON

YOUR OWN! HERE ARE SOME LINKS TO GET YOU STARTED

fritzing.org/projectshackster.io/arduino/projects

instructables.com/howto/arduino/

UPON GATHERING ENOUGH XP POINTS,

I, UNO, DECLARE YOU AS A NEWYOUNG MAKER!

23

Page 24: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Hardware

Practise light intensity analog measurements with the use of ‘Serial Monitor’...

LDR Sensor

Red Red Brown or 220 Ω

Brown Black Orange or 220 Ω

24

Page 25: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Software

75 XP points

Block the LDR sensor to light up the LED!

25

Page 26: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Hardware

Design a sonar for object detection using an ultrasonic sensor...

Ultrasonic Sensor

26

Page 27: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

Software

75 XP points

Good job for making it this far! Don’t forget to use ‘Serial Monitor’ to analyse your data

27

Page 28: Fun with Arduino - cdn.cytron.io · look for Arduino IDE icon and double click on it Raise your hand if you have any questions! 9. Step 2: Select File > New 10. Step 3: Select Tools

www.pscpen.com