Fun with Arduino

1 downloads 275 Views 3MB Size Report
UNO EDITION. Fun with Arduino. AN INTRODUCTION TO EMBEDDED SYSTEMs. Page 2. Hi there and welcome! My name is UNO and I w
Fun with Arduino AN INTRODUCTION TO EMBEDDED SYSTEMs

UNO EDITION

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!

2

1. Strobe Light

3. Musical Touch

2. Running LEDs

4. Musical Violin

Place your MAKER UNO on the outline

Buzzer slide switch

USB Micro B Connector RESET

Piezo Buzzer

Programmable button

Power Supply

Digital IN/OUT

Analog Input

Microcontroller

3

Hardware

4

Gain XP points by collecting stickers from your instructor for every project completed within the time given

50 XP points

Software

Your mission is to gather more than 300 XP points to UPGRADE yourself into a Young Maker!

5

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

Horizontal holes are linked together

Vertical holes are linked together too!

6

but not across the divider

The higher the resistance, the lower the current. That’s why the LED gets dimmer!

Voltage 9 V Brighter

Voltage 9 V

Current

0.027 A

Resistance 220 Ω

Dimmer

Resistance 1000 Ω

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

7

Current 0.006 A

Remember! The LED won’t light up if the polarity is reversed!

8

Rounded side (‘+’ Positive)

Flat side (‘-’ Negative)

Longer lead (‘+’ Positive)

Shorter lead (‘-’ Negative)

Raise your hand if you have any questions!

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

9

Step 2: Select File > New

10

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

Step 3: Select Tools > Board > Arduino/Genuino Uno

11

Can’t find COM10? Don’t worry! The COM port always appears in different numbers! Pick the one that appears on your screen

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

12

CONGRATULATIONS!

YOU HAVE LEARNED HOW TO CONFIGURE YOUR MAKER UNO ALL BY YOURSELF! HERE IS 50 XP TO GET YOU STARTED!

ARE YOU READY??

Serious face

Turn to next page to start your mission..

13

Hardware

Shorter leg is negative -ve terminal

Red Red Brown or 220 Ω

Light up an LED using digital output...

14

Software

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

Click to upload

15

50 XP points

Hardware

Light up the LED in sequence...

16

Hold it! Do not remove the circuit from Project 1! Just add two more LEDs to your existing circuit

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

1 17

2 100 XP points

Hardware

Don’t forget to turn on the buzzer switch

Brown black green or 1MΩ

Play musical tones by touching the pencil lead...

18

Software

19

You can play different tones by changing tone(8, 262) to tone(8, 294).. Give it a try!

100 XP points

Hardware

Create a violin using a DC motor...

20

Once you’ve uploaded your code, spin the fan blade and see what happens!

Software

21

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

Serial Monitor

75 XP points

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

CONGRATULATIONS! YOU HAVE COMPLETED THE COURSE!

UPON GATHERING ENOUGH XP POINTS, I, UNO, DECLARE YOU AS A NEW

YOUNG MAKER!

YOU HAVE NOW GAINED THE SKILLS NEEDED TO EXPLORE ON YOUR OWN! HERE ARE SOME LINKS TO GET YOU STARTED fritzing.org/projects hackster.io/arduino/projects instructables.com/howto/arduino/

23

Hardware

LDR Sensor Brown Black Orange or 220 Ω

Red Red Brown or 220 Ω Practise light intensity analog measurements with the use of ‘Serial Monitor’...

24

Software Block the LDR sensor to light up the LED!

25

75 XP points

Hardware

Ultrasonic Sensor

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

26

Software

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

27

75 XP points

www.pscpen.com