Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf ·...

36
Introduction to Arduino Yong Heui Cho @ Mokwon University

Transcript of Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf ·...

Page 1: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

Introduction to Arduino

Yong Heui Cho @ Mokwon University

Page 2: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

2

Basic Computer Design

1. History of Computers

2. Introduction to Arduino

3. Basic Computer Architecture

4. Combinational Logic Circuit

Page 3: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

3

What is Arduino?

Page 4: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

4

Arduino is a Board!

Page 5: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

5

Several Arduinos

Page 6: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

6

You can connect Sensors and Actuators.

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 7: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

7

Arduino Robot

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 8: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

8

Hardware Features (Uno) Microcontroller ATmega328p

Operating Voltage 5V

Digital I/O Pins 14 (of which 6 provide PWM output)

Analog Input Pins 6

DC current per I/O Pins

40mA

DC current for 3.3V Pin 50mA

Flash Memory 32KB

SRAM 2KB

EEPROM 1KB

Clock Speed 16MHz

ICSP Header In System Programming, used when you want to burn the bootloader, you'll need an AVR-ISP

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 9: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

9

Arduino IDE

Open Source

Cross Platform

Windows

Mac OS X

Linux

Simple UI (easy to use)

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 10: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

10

How to Connect Arduino

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 11: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

11

On-board LED will start to Blink.

On-board LED on Pin 13

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 12: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

12

Setup of Driver Arduino Duemilanove

Automatic setup

Arduino Uno and Mega ADK

Manual setup

Page 13: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

13

What is Arduino?

Open source

Open Source Hardware

Open Source Software

Easy to program

Simple IDE

Simplified C/C++ or Java Language

Simple hardware abstraction API

Electronics prototyping platform

Base for other things or products

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 14: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

14

Overview of Arduino

Open Source + Software IDE + Community Hardware

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 15: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

15

Arduino Programming

void main() {

init();

setup();

while (1) loop();

}

setup()

Only once executed

loop()

Infinitely executed

Page 16: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

16

Arduino Derivatives, Shields, and

Sensors

Page 17: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

17

Arduino Derivative (I)

UNO

Duemilanove

Mega

Nano

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 18: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

18

Arduino Derivative (II)

LilyPad

Mini

Mega ADK

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 19: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

19

Arduino and Communication

Arduino BT

(Bluetooth) Arduino Ethernet

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 20: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

20

Compatible Arduinos

Freeduino Seeeduino

Boarduino(ladyada) Teensyduino

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 21: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

21

Compatible Arduinos

EtherTen USBDroid (USB host)

Zigduino (ZigBee) Ardupilot

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 22: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

22

Compatible Arduinos

Metaboard (V-USB) Japanino

InduinoX (On board RTC,

RGB LED, IR LED/Recvr, LDR) Migon Game Kit (On board

LED Matrix, Speaker, Buttons)

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 23: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

23

Arduino Clones (Non-ATmega)

Digilent Chipkit (PIC32)

LeafLabs Maple (STM32)

Pinguino (PIC18/32)

Netduino (Atmel ARM7, use .NET)

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 24: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

24

Arduino Clones (Non-ATmega)

FEZ Panda (NXP ARM7, use .NET) Firebird32 (Freescale 32-bit RISC)

mbed (NXP ARM Cortex-M0/M3) LaunchPad (TI MSP430G2xxx)

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 25: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

25

Ethernet Shield

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 26: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

26

Shields

Motor Shield microSD Shield Touch Shield

Input Shield MP3 Shield SEMeter Shield

(Smart Meter)

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 27: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

27

Shields

Buzzer

LCD OLED

Vibrator Relay

LED Matrix

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 28: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

28

Communication Shields

RFID Ethernet WiFi

Bluetooth GPRS WiFly

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 29: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

29

Communication Shields

GPS XBee

RFM12B

(Hope RF)

nRF24L01

(Nordic)

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 30: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

30

Photocell (light sensor) Color sensor Rotation sensor

(potentiometer)

Joystick Sound Sensor Water Sensor

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Sensors

Page 31: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

31

Sensors

PIR Sharp IR Sensor Temperature/Humidity

Ultrasonic Compass Tri-Axis Accelerometer

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 32: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

32

Sensors

AC Current Sensor Hall Sensor CO2 Sensor

Infrared Receiver Flex Sensor Flame Sensor

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 33: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

33

Sensors

IR Thermometer Smoke Detector Pressure

Polar Heart Rate Sensor RTC pH Sensor

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 34: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

34

Phone Hardware Interface

Light Sensor G-Sensor

Compass

Vibrator

And more: • Proximity Sensor • Temperature sensor • Multi-touch Screen • Trackball • Microphone • and so on

Camera

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 35: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

35

Android + Arduino

□ Courtesy to Cooper Maa, Arduino 介紹, slideshare, 2012.

Page 36: Introduction to Arduino - KOCWcontents.kocw.net/KOCW/document/2015/mokwon/choyongheui/2.pdf · Introduction to Arduino Yong Heui Cho @ Mokwon University . 2 Basic Computer Design

36

Arduino: 직렬 통신 연결