Intro
스마트폰 앱 개발이 대중화 되어 가면서, 관심만 있다면 일반인도 쉽게 앱 개발이 가능해지고 있습니다. 이번 튜토리얼에서는 스마트폰 App 을 활용하여 위즈네트 보드를 컨트롤 하는 방법에 대해서 설명합니다.
본 튜토리얼의 저자는 최근에 'Blynk'라는 매우 흥미로운 앱 플랫폼을 찾게됩니다. 하지만 아쉽게도 이 플랫폼은 Arduino와 같은 특정한 디바이스 관련한 라이브러리만 제공됩니다. 본 포스팅에서는 WIZnet W5500-EVB 보드에 Blynk Library를 포팅해 보겠습니다.
About W5500-EVB
W5500-EVB는 32-bit ARMW5500® Cortex™-M0 마이크로 컨트롤러 기반의 W5500 칩에 대한 테스트 보드입니다. 이 제품은 위즈네트의 하드웨어에 TCP/IP가 내장되어 있는 임베디드 이더넷 컨트롤러인 W5500을 사용, Low-end MCU 기반의 시스템에서도 효율적으로 인터넷 연결을 쉽게 하는 역할을 합니다.
더 자세한 사항을 위해서는 WIZnet Wiki 사이트; W5500-EVB 을 참조해 주세요
http://wizwiki.net/wiki/doku.php?id=products:w5500:w5500_evb:start
Features
WIZnet W5500 Hardwired TCP/IP chip
- Hardwired TCP/IP embedded Ethernet controller
- SPI (Serial Peripheral Interface) Microcontroller Interface
- 32kB internal Tx/Rx socket buffer memory
- Hardwired TCP/IP stack supports TCP, UDP, IPv4, ICMP, ARP, IGMP, and PPPoE protocols
NXP LPC11E36/501 MCU (LPC11E36FHN33)
- 32-bit ARM® Cortex™-M0 microcontroller running at up to 50MHz
- 96kB on-chip flash program memory
- 12kB on-chip SRAM data memory
- 4kB on-chip EEPROM data memory
- 1 x UART, 1 x I2C, 2 x SPI/SSP, 8 x 10-bit ADC, 4 x Timer (16, 32-bit), 11 x PWM
Microchip TC1047A (Temperature-to-Voltage Converter)
- On-board Temperature sensor
- Supply Voltage Range: 2.7V to 4.4V
- Wide Temperature Measurement Range: -40 to +125 celsius degrees
Connectors
- Pin-compatible with Arduino Shields designed for the UNO Rev3
- 5V DC power supply and +5V/500mA from power supply USB connector
- 10/100Mbps Ethernet (RJ-45 with transformer)
- ARM standard debug connector: 10-pin Cortex debug connector for SWD (Serial Wire Debug)
About Blynk
Blynk 를 사용하여 5분만에 나만의 Arduino 프로젝트 App 만들어 보겠습니다.
Blynk는 위젯 방식으로 Drag & Drop으로 슬라이더, 디스플레이, 그래프 등 다양한 기능의 App을 만들수가 있으며, 빠른 시간내에 아두이노를 컨트롤하고 데이터를 받아올 수 있습니다.
더 자세한 사항은 Blynk의 공식 홈페이지인,
http://www.blynk.cc/ 를 참조해 주세요
Step 1: Parts
Android Mobile Phone 또는 iPhone
- Blynk 은 2가지로 나뉩니다; Google Android App 와 Apple iOS app
아이폰을 위한 Blynk App
WIZnet W5500-EVB 보드
- W5500 테스트 보드로 32-bit ARM® Cortex™-M0 (NXP) MCU 내장
- Arduino 핀 호환(Arduino Shield available)
NXP LPCXpresso IDE 설치된 컴퓨터
Step 2: Download Blynk App and Get the Auth key Token in the App
Blynk App은
http://www.blynk.cc/getting-started/ 에서 다운로드 가능합니다.
Step 3: Download Simple Blynk Library for W5500-EVB
GitHub repository에 펌웨어 소스코드 프로젝트가 게시되어 있습니다.
https://github.com/Wiznet/BLYNK_LPC11E36_LPCXpresso
Step 4: Set your App’s Auth key to the source code
App의 Auth key를 소스코드로 설정해 주세요 – array Auth[] in main.c (32 bytes)
Step 5: Build the Project and program to W5500-EVB
이 프로젝트는 NXP LPCXpresso IDE 기반으로 하고 있습니다. IDE에 프로젝트를 프로그램화 시킨 W5500-EVB. NXP MCU 플레쉬 프로그래밍 가이드:
http://wizwiki.net/wiki/doku.php?id=products:w5500:w5500_evb:getting_started#downloading_a_new_program
Step 6: Open Blynk app and Add widgets reffering to W5500-EVB Pinmap
Blynk app에 있는 하드웨어를 Arduino UNO로 선택해 주세요. W5500-EVB 은 Arduino 핀 호환의 보드이기 때문에 핀 ‘D0 ~ D15′ 와 ‘A0 ~ A5′ 가 사용 가능합니다.
때문에 W5500-EVB의 핀 맵을 꼭 확인하신 후에 사용 바랍니다.
Step 7: Run!
자 이제 W5500-EVB 와 Blynk 를 이용하여 자신만의 무선 컨트롤러와 모니터를 한번 만들어 보세요.
Note
- 이 예제에서는 꼭 (1) DHCP client code 와 Router(DHCP server) 를 사용하거나 (2) Public IP address 를 사용하여야 합니다.