playing with arduino open source h/w for mobile-centric services

Post on 15-Dec-2014

201 Views

Category:

Engineering

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Playing with arduino open source h/w for mobile-centric services 2014년 9월 24일 통신학회 강의 개요 : 오픈소스 하드웨어를 기반으로 모바일과 클라우드 개발하는 방법 소개 1. 아두이노 소개 : 아두이노의 특징 및 IoT와의 상관관계 설명 2. 무선 통신 모듈 실습 : XBee, BT, WiFi 사용하기 3. 아두이노 YUN과 Temboo를 이용한 웹 API 활용 4. 아두이노 MEGA ADK를 이용한 안드로이드 기기와의 통신

TRANSCRIPT

Playing����������� ������������������  with����������� ������������������  Arduino����������� ������������������  ����������� ������������������  Open-Source����������� ������������������  H/W����������� ������������������  ����������� ������������������  

for����������� ������������������  mobile-centric����������� ������������������  services

C����������� ������������������  /����������� ������������������  C++����������� ������������������  할����������� ������������������  줄����������� ������������������  알아요!!

처음����������� ������������������  뵙겠습니다!!

저희도����������� ������������������  처음����������� ������������������  뵙겠습니다!!

강의����������� ������������������  순서

+ +

?

Ivrea

IDII(Interaction����������� ������������������  Design����������� ������������������  Institute����������� ������������������  Ivrea)����������� ������������������  2001����������� ������������������  ~����������� ������������������  2005

마시모����������� ������������������  반지����������� ������������������  (Massimo����������� ������������������  Banzi)

2002

피지컬����������� ������������������  컴퓨팅����������� ������������������  (Physical����������� ������������������  Computing)

베이직����������� ������������������  스탬프����������� ������������������  (BASIC����������� ������������������  Stamp)

1.학생들에게����������� ������������������  부담스런����������� ������������������  가격(당시����������� ������������������  100불)

2.윈도우에서만����������� ������������������  개발����������� ������������������  가능

3.저성능으로����������� ������������������  인한����������� ������������������  낮은����������� ������������������  사용성

케이시����������� ������������������  리아스����������� ������������������  (Casey����������� ������������������  Reas)

프로세싱����������� ������������������  (Processing)

프로세싱 아두이노

아두이노����������� ������������������  특징

1.����������� ������������������  쉽다!

digitalRead����������� ������������������  digitalWrite����������� ������������������  analogRead����������� ������������������  analogWrite

MP3 WiFi

Motor Joystick

2.����������� ������������������  오픈소스다!

https://github.com/vheun/ArduinoPlaysTimberman

3.����������� ������������������  싸다!

http://www.aliexpress.com/

아두이노를����������� ������������������  ����������� ������������������  배워봅시다!

입력

출력

디지털 아날로그

입력

출력

그����������� ������������������  외����������� ������������������  전자부품

저항

열����������� ������������������  에너지

축전지

다이오드

브레드����������� ������������������  보드

디지털����������� ������������������  &����������� ������������������  아날로그

ON OFF

디지털

pinMode(13,OUTPUT)INPUT����������� ������������������  OUTPUT

int����������� ������������������  a����������� ������������������  =����������� ������������������  digitalRead(13);

HIGH LOW

PULL-UP����������� ������������������  PULL-DOWN

내가����������� ������������������  불을����������� ������������������  켜면����������� ������������������  뛰고,����������� ������������������  

불이����������� ������������������  꺼지면����������� ������������������  멈춰!!

알겠음!!

digitalWrite(13,����������� ������������������  HIGH);LOW����������� ������������������  HIGH

아날로그

int����������� ������������������  a����������� ������������������  =����������� ������������������  analogRead(A0);

(0����������� ������������������  ~����������� ������������������  1,023)

PWM

HIGH

LOW

analogWrite(9,����������� ������������������  255)0����������� ������������������  ~����������� ������������������  255

void����������� ������������������  setup(){����������� ������������������  !

}����������� ������������������  !void����������� ������������������  loop(){����������� ������������������  !

}

한번����������� ������������������  실행

반복����������� ������������������  실행

main??

int����������� ������������������  main(void)����������� ������������������  {����������� ������������������  ����������� ������������������   init();����������� ������������������  !

����������� ������������������   initVariant();����������� ������������������  !

#if����������� ������������������  defined(USBCON)����������� ������������������  ����������� ������������������   USBDevice.attach();����������� ������������������  #endif����������� ������������������  ����������� ������������������   ����������� ������������������  ����������� ������������������   setup();����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������   for����������� ������������������  (;;)����������� ������������������  {����������� ������������������  ����������� ������������������   ����������� ������������������   loop();����������� ������������������  ����������� ������������������   ����������� ������������������   if����������� ������������������  (serialEventRun)����������� ������������������  serialEventRun();����������� ������������������  ����������� ������������������   }����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������  ����������� ������������������   return����������� ������������������  0;����������� ������������������  }

void����������� ������������������  setup(){����������� ������������������  !

}����������� ������������������  !void����������� ������������������  loop(){����������� ������������������  !

}

초기화

동작����������� ������������������  관련

http://arduino.cc/en/Reference/Libraries

아두이노����������� ������������������  &����������� ������������������  IoT

?

https://www.kickstarter.com/

프로토타입����������� ������������������  개발����������� ������������������  시간����������� ������������������  단축

통신����������� ������������������  모듈

시리얼����������� ������������������  통신

블루투스

RXD

TXD

Android����������� ������������������  Sample����������� ������������������  Project

BluetoothChat

XBee

https://www.sparkfun.com/

시리즈,����������� ������������������  XBee����������� ������������������  모듈����������� ������������������  방향����������� ������������������  확인

스위치를����������� ������������������  DLINE으로����������� ������������������  설정

http://www.digi.com/products/wireless-wired-embedded-solutions/zigbee-rf-modules/xctu

WiFi

http://arduino.cc/en/Hacking/WiFiShieldFirmwareUpgrading����������� ������������������  http://flashgamer.com/arduino/comments/how-to-update-the-official-arduino-wifi-shield

J3����������� ������������������  커넥터.����������� ������������������  업그레이드시에만����������� ������������������  연결하고,����������� ������������������  평소에는����������� ������������������  빼고����������� ������������������  사용.

아두이노����������� ������������������  IDE����������� ������������������  1.0.6����������� ������������������  사용

http://arduino.cc/en/Main/Software

파일����������� ������������������  -����������� ������������������  예제����������� ������������������  -����������� ������������������  WiFi����������� ������������������  -����������� ������������������  WiFiWebClient

WiFi����������� ������������������  SSID와����������� ������������������  비밀번호����������� ������������������  입력

http://arduino.cc/en/Tutorial/YunSysupgrade

http://arduino.local/����������� ������������������  http://192.168.240.1

arduino

기본����������� ������������������  정보����������� ������������������  및����������� ������������������  타임����������� ������������������  존����������� ������������������  변경����������� ������������������  가능

WiFi����������� ������������������  관련����������� ������������������  설정

OPEN

http://arduino.local/

arduino

아두이노����������� ������������������  IDE����������� ������������������  1.5.7����������� ������������������  사용

파일����������� ������������������  -����������� ������������������  예제����������� ������������������  -����������� ������������������  Bridge����������� ������������������  -����������� ������������������  HttpClient

파일����������� ������������������  -����������� ������������������  예제����������� ������������������  -����������� ������������������  Bridge����������� ������������������  -����������� ������������������  Bridge

제거

http://arduino.cc/en/Tutorial/Bridge

https://www.temboo.com/

https://www.temboo.com/library/

Yahoo����������� ������������������  -����������� ������������������  Weather����������� ������������������  -����������� ������������������  GetWeatherByAddress

1.����������� ������������������  IoT����������� ������������������  Mode����������� ������������������  ON

2.����������� ������������������  Arduino����������� ������������������  Yun

3.����������� ������������������  seoul����������� ������������������  입력����������� ������������������  후����������� ������������������  엔터

4.����������� ������������������  결과

TembooAccount.h

TembooAccount.h

Device����������� ������������������  Coder����������� ������������������  -����������� ������������������  Arduino����������� ������������������  -����������� ������������������  Yun����������� ������������������  -����������� ������������������  Phone

예)����������� ������������������  02-123-4567

https://kr.nexmo.com/

Accessory����������� ������������������  Development����������� ������������������  Kit

https://github.com/felis/USB_Host_Shield_2.0

폴더명을����������� ������������������  USB_Host_Shield_20����������� ������������������  

으로����������� ������������������  변경

문서����������� ������������������  폴더����������� ������������������  -����������� ������������������  Arduino����������� ������������������  -����������� ������������������  libraries

42번째����������� ������������������  줄����������� ������������������  #define����������� ������������������  USE_UHS_MEGA_ADK����������� ������������������  0

#define����������� ������������������  USE_UHS_MEGA_ADK����������� ������������������  1

파일����������� ������������������  -����������� ������������������  예제����������� ������������������  -����������� ������������������  USB_Host_Shield_20����������� ������������������  -����������� ������������������  adk����������� ������������������  -����������� ������������������  ArduinoBlinkLED����������� ������������������  

https://github.com/Lauszus/ArduinoBlinkLED

http://felis.github.io/USB_Host_Shield_2.0/

들어주셔서����������� ������������������  감사합니다^-^

junhyuk.lee@magice.co

top related