nCube:Thyme for Arduino Development Environment Setup with VS Code (PlatformIO IDE) (Korean) - IoTKETI/nCube-Thyme-Arduino GitHub Wiki

nCube:Thyme for Arduino Development Environment Setup with VS Code (PlatformIO IDE)

์•„๋‘์ด๋…ธ ๊ฐœ๋ฐœ์„ ์œ„ํ•œ ๊ฐœ๋ฐœํ™˜๊ฒฝ์œผ๋กœ๋Š” ๋ณดํ†ต Arduino IDE์™€ PlatformIO IDE๊ฐ€ ์‚ฌ์šฉ๋œ๋‹ค.
๋ณธ ๋ฌธ์„œ์—์„œ๋Š” PlatformIO IDE๋ฅผ VC Code (Visual Studio Code)์— ์„ค์น˜ํ•˜์—ฌ ์‚ฌ์šฉํ•˜๋ฉฐ,
PlatformIO IDE๋ฅผ ์‚ฌ์šฉํ•จ์œผ๋กœ์จ ์ทจํ•  ์ˆ˜ ์žˆ๋Š” ์žฅ์ ๋“ค์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค.

  • 400๊ฐœ ์ด์ƒ์˜ ๋ณด๋“œ ๋งค๋‹ˆ์ € ์ œ๊ณต
  • ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋งค๋‹ˆ์ €
  • intelligence code completion๊ณผ smart code linter

1. VS Code and PlatformIO IDE installation

1.1. VS Code installation

VS Code๋Š” Microsoft ์‚ฌ์— ์˜ํ•ด ๊ฐœ๋ฐœ๋˜์—ˆ์œผ๋ฉฐ, ๋ฌด๋ฃŒ๋กœ ์ œ๊ณต๋˜๋Š” ์ฝ”๋“œ ํŽธ์ง‘๊ธฐ์ด๋‹ค.
VS Code ๋‚ด์—์„œ ์ œ๊ณต๋˜๋Š” ๋งˆ์ผ“ํ”Œ๋ ˆ์ด์Šค์—์„œ ํ™•์žฅ ํŒจํ‚ค์ง€๋ฅผ ์„ค์น˜ํ•จ์œผ๋กœ์จ ๊ธฐ๋Šฅ ํ™•์žฅ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.


VS Code official web site์—์„œ OS์— ๋งž๋Š” VS Code๋ฅผ ๋‹ค์šด๋กœ๋“œ ๋ฐ›๊ณ  ์„ค์น˜ํ•  ์ˆ˜ ์žˆ๋‹ค.


VS Code installer๋ฅผ ์‹คํ–‰์‹œ์ผœ VS Code๋ฅผ ์„ค์น˜ํ•œ๋‹ค.


์„ค์น˜๊ฐ€ ๋๋‚œ ๋’ค์— VS Code๋ฅผ ์‹คํ–‰ํ•œ ๋ชจ์Šต์ด๋‹ค.

1.2. PlatformIO IDE installation


VS Code์˜ ์™ผ์ชฝ ์‚ฌ์ด๋“œ๋ฐ”์˜ 5๋ฒˆ์งธ ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜์—ฌ ๋งˆ์ผ“ํ”Œ๋ ˆ์ด์Šค๋ฅผ ์—ด๊ณ ,
'PlatformIO IDE'๋ฅผ ๊ฒ€์ƒ‰ํ•˜์—ฌ PlatformIO IDE ํ™•์žฅ๊ธฐ๋Šฅ์„ ํด๋ฆญํ•˜๊ณ ,
Install ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ PlatformIO IDE๋ฅผ ์„ค์น˜ํ•œ๋‹ค.


PlatformIO IDE ํ™•์žฅ๊ธฐ๋Šฅ์˜ ์„ค์น˜๊ฐ€ ๋๋‚œ ์ดํ›„์— Reload ๋ฒ„ํŠผ์ด ๋ณด์ด๋ฉด ์ด ๋ฒ„ํŠผ์„ ๋ˆŒ๋Ÿฌ VS Code๋ฅผ ์žฌ์‹คํ–‰ ์‹œํ‚จ๋‹ค.


VS Code๊ฐ€ ์žฌ์‹คํ–‰ ๋œ ๋’ค์— PlatformIO IDE๊ฐ€ ์ถ”๊ฐ€์ ์œผ๋กœ ํ•„์š”ํ•œ ํŒจํ‚ค์ง€๋ฅผ ์ž๋™์œผ๋กœ ์„ค์น˜ํ•˜๋ฉฐ,
'Please restart VSCode'๋ผ๋Š” ๋ฌธ๊ตฌ๊ฐ€ ๋‚˜ํƒ€๋‚ฌ์„ ๋•Œ ๋‹ค์‹œ VS Code๋ฅผ ์žฌ์‹คํ–‰ํ•œ๋‹ค.


VS Code๊ฐ€ ์žฌ์‹คํ–‰ ๋œ ์ดํ›„์— VS Code์˜ ์‚ฌ์ด๋“œ๋ฐ”์— PlatformIO IDE๋ฒ„ํŠผ์ด ์ถ”๊ฐ€๋˜๋ฉฐ, PlatformIO IDE์˜ ํ™ˆ ํ™”๋ฉด์ด ๋‚˜ํƒ€๋‚œ๋‹ค.

2. nCube:Thyme for Arduino application development environment setup

2.1. New nCube:Thyme for Arduino Project Creation


PlatformIO IDE์˜ ํ™ˆ ํ™”๋ฉด์—์„œ New Project ๋ฒ„ํŠผ์„ ํด๋ฆญํ•œ๋‹ค.


Name์—๋Š” ์›ํ•˜๋Š” ํ”„๋กœ์ ํŠธ ์ด๋ฆ„์„, Board์—๋Š” 'Adafruit Feather M0'๋ฅผ, Framework์—๋Š” 'Arduino'๋กœ ์„ค์ •ํ•œ๋‹ค.


Location์˜ Use default location์„ ํ•ด์ œํ•˜๊ณ , ์›ํ•˜๋Š” ํ”„๋กœ์ ํŠธ ํด๋” ์ƒ์„ฑ ์žฅ์†Œ๋ฅผ ์„ ํƒํ•œ ๋’ค์— Finish๋ฒ„ํŠผ์„ ๋ˆ„๋ฅธ๋‹ค.


ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ์ด ์™„๋ฃŒ๋œ ์ดํ›„์—, VS Code์˜ Fileํƒญ์˜ Open Folder๋ฉ”๋‰ด๋ฅผ ์„ ํƒํ•˜๊ณ  ์œ„์—์„œ ์ƒ์„ฑํ•œ ํ”„๋กœ์ ํŠธ์˜ ํด๋”๋ฅผ ์„ ํƒํ•˜์—ฌ ์—ด์–ด์ค€๋‹ค.


์œ„์˜ ๊ทธ๋ฆผ๊ณผ ๊ฐ™์ด ํ”„๋กœ์ ํŠธ ํด๋”๊ฐ€ ์—ด๋ฆผ์„ ์•Œ ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์•„๋‘์ด๋…ธ๋ฅผ ๋™์ž‘์‹œํ‚ค๋Š” main.cpp ํŒŒ์ผ์ด src ํด๋” ์•„๋ž˜์— ์žˆ์Œ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

2.2. nCube:Thyme for Arduino libraries download and import


https://github.com/IoTKETI/nCube-Thyme-Arduino ๋งํฌ์—์„œ nCbue:Thyme for Arduino ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„ ๋‹ค์šด๋กœ๋“œ ๋ฐ›๊ณ ,
์••์ถ•์„ ํ’€์–ด์ค€๋‹ค.


nCube-Thyme-Aruino/libraries ํด๋” ๋‚ด์— nCube Thyme for Arduino๋ฅผ ๊ฐœ๋ฐœํ•˜๊ธฐ์œ„ํ•ด ํ•„์š”ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„
์ƒ์„ฑํ•œ ํ”„๋กœ์ ํŠธ ํด๋”์˜ lib ํด๋” ๋‚ด๋กœ ๋ณต์‚ฌํ•œ๋‹ค.


nCube-Thyme-Arduino์˜ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋“ค์„ ์ƒ์„ฑํ•œ ํ”„๋กœ์ ํŠธ ํด๋” ๋‚ด์˜ lib ํด๋”๋กœ ๋ณต์‚ฌํ•œ ๋ชจ์Šต์ด๋‹ค.

์ด๋กœ์„œ nCube:Thyme for Arduino๋ฅผ ๊ฐœ๋ฐœํ•˜๊ธฐ ์œ„ํ•œ ๊ฐœ๋ฐœ ํ™˜๊ฒฝ๊ตฌ์„ฑ์„ ์™„๋ฃŒ ํ•˜์˜€๋‹ค.

Contents

  1. Indroduction
  2. Development Environment Setup
  3. nCube-Air Board & Sensors Setup
  4. nCube-Air Setup & Execution
  5. nCube-Air Data Retrieve & LED Control
  6. nCube-Air Date Retrieve with oneM2M API
โš ๏ธ **GitHub.com Fallback** โš ๏ธ