Presentation is loading. Please wait.

Presentation is loading. Please wait.

Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology.

Similar presentations


Presentation on theme: "Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology."— Presentation transcript:

1 Youn-Hee Han, In-Seok Kang {yhhan, Iseka}@kut.ac.kr Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology http://link.kut.ac.kr Ubiquitous Computing Practice (Introduction)

2 / 46 Introduction Arduino 소개 실습 재료 Arduino 개발환경 Arduino & Processing Language 2 Contents

3 / 46 실습 재료 아두이노 인벤터킷, Humidity sensor Xbee module, shield RFID module, shield 3

4 / 464 아두이노 인벤터킷

5 / 465 아두이노 인벤터킷

6 / 466 Xbee module, Shield 확장쉴드 결합 상태

7 / 467 RFID module, Shield, Tag RFID Evaluation Shield - 13.56MHz RFID Module - SM130 Mifare RFID Tag

8 / 46 아두이노 ( Arduino ) Arduino 는 이탈리어이고 영어로는 Best Friend 아두이노는 오픈소스를 기반으로한 마이크로 컴퓨터 AVR 계열의 칩셋을 사용 (atmege328) USB 로 간단히 컴파일하고 업로드 할 수있다. 멀티 플랫폼 지원 ( Windows, Mac, Linux 지원 ) Processing 이라는 언어사용 ( Java, C 언어와 유사 ) 프로그래밍 코드를 Sketch 라고 한다 8 Arduino Arduino UNO board

9 / 469 Arduino Arduino boardArduino IDEOpen Source

10 / 4610 Arduino UNO R2 board Arduino is a small computer! Small computer with microcontroller (ATmega328 microcontroller )

11 / 46 ATmega328 microcontroller Input voltage: 7-12V 14 Digital I/O Pins (6 PWM outputs) 6 Analog Inputs 32k Flash Memory 16Mhz Clock Speed 11 Features

12 / 46 USB 인터페이스칩 변경 Atmega8u2 에서 Atmega16u2 로 변경 헤더 핀 3 개 추가 I2C 헤더 소켓 2 개 추가 IOREF 헤더 소켓 1 개 추가 Reset 버튼 위치 변경 12 Arduino UNO R2 R3

13 / 4613 Arduino UNO R3 board

14 / 46 아두이노 UNO 보드 의 고성능 버전 ATMega328 을 ATMega2560 으로 변경 메모리 용량 8 배 증가 디지털 입출력 핀 54 개로 증가 아날로그입력 16 개로 증가 14 아두이노 메가 (Arduino Mega 2560) 기본사양 : 54 Digital I/O Pins (14 PWM outputs) 16 Analog Inputs 4 UARTs( 하드웨어 시리얼 포트 ) 256KB Flash MemorySRAM 8KB EEPROM 4KB 16Mhz Clock Speed

15 / 46 아두이노 UNO 에 기본 장착된 USB 변환기 등을 제거하여 경제적으로 사용할 수 있는 버전 ( 전문가용 ) 프로그래밍을 위해 USB to Serial 변환기가 필요 15 아두이노 프로 (Arduino Pro 328) 기본사양 : 14 Digital I/O Pins (6 PWM outputs) 6 Analog Inputs 32k Flash Memory 16Mhz Clock Speed

16 / 4616 아두이노 프로 미니 (Arduino Pro Mini 328) 기본사양 : 14 Digital I/O Pins (6 PWM outputs) 6 Analog Inputs 32k Flash Memory 16Mhz Clock Speed

17 / 46 원형모양의 보드로 전도성 실을 이용하여 바느질을 하여 회로를 구성 예술작품 및 미적 완성도를 위한 디자이너를 위한 보드 17 릴리패드 (LilyPad Arduino 328) 기본사양 : 14 Digital I/O Pins (6 PWM outputs) 6 Analog Inputs 32KB Flash Memory 8Mhz Clock Speed

18 / 46 ARDUINO 개발환경 개발환경 구축 및 IDE 사용법 드라이버 설치 18

19 / 4619 IDE Processing 언어에 기반을 둔 프로그래밍 언어 sketch

20 / 4620 Arduino development environment http://www.arduino.cc/

21 / 4621 Arduino development environment

22 / 4622 Arduino development environment

23 / 4623 Arduino IDE Upload (to Arduino Board) Verify (Compile) Serial monitor

24 / 46 Verify / Compile 작성한 프로그램 코드가 제대로 되었는지 확인해주고, 이상이 없으면 컴파일이라는 과정을 통해 기계가 이해할 수 있는 언어로 바꿔준다. Upload Verify 로 오류도 없고, 기계가 이해할 수 있는 언어로 바뀐 코드를 아두 이노 보드로 보내주는 기능이다. New 새로운 스케치 작업을 할 때 사용한다. Open 기존에 작성된 스케치를 열 때 사용한다. Save 지금 작성하고 있는 스케치 즉 프로그램 코드를 저장한다. Serial Monitor 시리얼로 보내고 받는 값을 확인할 때 사용한다. 24 Arduino IDE

25 / 4625 Arduino development envionment USB A type USB B type USB2.0 A-B Cable

26 / 4626 Arduino development envionment USB A type USB B type

27 / 4627 Arduino development envionment

28 / 4628 Arduino development environment

29 / 46 ARDUINO & PROCESSING LANGUAGE 29

30 / 46 Processing 은 오픈 소스 프로젝트로 MIT 미디어 연구소 에서 시작 되었다. (by Casey Reas, 벤자민 프라이 ) Processing is an open source programming language and environment for people who want to create images, animations, and interactions. http://www.processing.org/ http://wearechopchop.com/%E2%80%9Cunnamed- soundsculpture%E2%80%9D/ http://wearechopchop.com/%E2%80%9Cunnamed- soundsculpture%E2%80%9D/ http://max-planck-research-networks.net/ 30 Processing

31 / 4631 Arduino http://www.arduino.cc/

32 / 4632 Wiring http://wiring.org.co/

33 / 4633 void setup() { // Do initialization : Executed only once } void loop() { // Loop : Continuously executed } Arduino Basic Structure

34 / 4634 Example - Blink Sketch void setup() { // initialize the digital pin as an output. // Pin 13 has an LED connected on most Arduino boards: pinMode(13, OUTPUT); } void loop() { digitalWrite(13, HIGH); // set the LED on delay(1000); // wait for a second digitalWrite(13, LOW); // set the LED off delay(1000); // wait for a second }

35 / 46 Structure setup() loop() Functions pinMode (pin, mode) – 사용 할 디지털 pin 번호, 사용 모드 digitalWrite (pin, value) – pin 번호에 value 값 출력 delay(ms) – millisecond 사용 ex) delay(1000) 1sec delay Variables HIGH, LOW, INPUT, OUTPUT 35 Reference

36 / 4636 Example - Blink 1.Click Verify(compile) and check error 2.Check if Arduino is connected 3.Click Upload While uploading code to Arduino, you will see fast blinking lights on TX and RX LEDs 4. Code will start running soon

37 / 4637 Example - Blink

38 / 46 도전과제 38

39 / 4639 How about two LEDs?

40 / 46 APPENDIX. 드라이버 설치 40

41 / 46 1. 윈도우 시작 > 제어판 > 장치관리자 2. 장치리스트에서 Arduino UNO 장치 선택 후 우 클릭 3. 드라이버 업데이트 선택 41 Driver install

42 / 4642 Driver install

43 / 4643 Driver install

44 / 4644 Driver install

45 / 4645 Driver install

46 / 4646 Driver install


Download ppt "Youn-Hee Han, In-Seok Kang {yhhan, Laboratory of Intelligent Networks Advanced Technology Research Center Korea University of Technology."

Similar presentations


Ads by Google