nCube:Thyme for Arduino Application : nCube Air (Korean) nCube Air Data Retrieve & LED Control - IoTKETI/nCube-Thyme-Arduino GitHub Wiki

nCube-Air Data Retrieve & LED Control

1. oneM2M Resource Monitor for Mobius



oneM2M Resource Monitor for Mobius๋Š” Mobius์— ์ƒ์„ฑ๋˜๋Š” ๋ฆฌ์†Œ์Šค๋ฅผ ์‹ค์‹œ๊ฐ„์œผ๋กœ ๋ณด์—ฌ์ฃผ๊ณ ,
๋ฆฌ์†Œ์Šค์˜ ์ƒ์„ฑ๊ณผ ์‚ญ์ œ ๊ธฐ๋Šฅ์„ ์ง€์›ํ•œ๋‹ค.
๋ณธ ๋ฌธ์„œ์—์„œ๋Š” oneM2M Resource Monitor for Mobius๋ฅผ ์ด์šฉํ•˜์—ฌ nCube-Air์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์กฐํšŒํ•˜๊ณ  LED๋ฅผ ์ œ์–ดํ•œ๋‹ค.

2. nCube-Air Data Retrieve



oneM2M Resource Monitor for Mobius์˜ Target Resource์— nCube-Air ์†Œ์Šค ์ฝ”๋“œ์—์„œ ์„ค์ •ํ•œ AE_NAME์˜ ๊ฐ’์„ ์ž…๋ ฅํ•˜๊ณ 
Start ๋ฒ„ํŠผ์„ ํด๋ฆญํ•œ๋‹ค.


์œ„์˜ ๊ทธ๋ฆผ๊ณผ ๊ฐ™์ด nCube-Air๊ฐ€ Mobius์— ์ƒ์„ฑํ•œ ๋ฆฌ์†Œ์Šค ๊ตฌ์กฐ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.


๋…ธ๋ž€์ƒ‰์œผ๋กœ ํ‘œ์‹œ๋œ container(cnt) ๋ฆฌ์†Œ์Šค ์•„์ด์ฝ˜ ์˜ค๋ฅธ์ชฝ์˜ + ๋ฒ„ํŠผ์„ ํด๋ฆญํ•˜๋ฉด cnt ๋ฆฌ์†Œ์Šค ํ•˜์œ„์˜ cin ๋ฆฌ์†Œ์Šค ๋ฐ์ดํ„ฐ๋ฅผ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.


tvoc, co2, temp cnt ๋ฆฌ์†Œ์Šค์— ์ƒ์„ฑ๋œ ๋ฐ์ดํ„ฐ์™€ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์ƒ์„ฑ๋˜๋Š” ๋ฐ์ดํ„ฐ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค.

3. nCube-Air LED Control

nCube-Air์˜ RGB-LED๋ฅผ ์ œ์–ดํ•˜๊ธฐ ์œ„ํ•ด์„œ led cnt ๋ฆฌ์†Œ์Šค ์•„๋ž˜์— contentInstance(cin)๋ฆฌ์†Œ์Šค๋ฅผ ์ƒ์„ฑํ•œ๋‹ค.


led cnt ๋ฆฌ์†Œ์Šค ์œ„์— ๋งˆ์šฐ์Šค๋ฅผ ์œ„์น˜์‹œํ‚ค๊ณ , ์šฐํด๋ฆญ ํ•˜์—ฌ ๋“œ๋กญ๋‹ค์šด ๋ฉ”๋‰ด๋ฅผ ๋„์šด ๋’ค์— Create ๋ฒ„ํŠผ์„ ํด๋ฆญํ•œ๋‹ค.


Create a child resource ์ฐฝ์—์„œ 'Content Instance' ๋ฆฌ์†Œ์Šค๋ฅผ ์„ ํƒํ•˜๊ณ ,
Content(con)์˜ ๊ฐ’์— 0~7 ์‚ฌ์ด์˜ ๊ฐ’์„ ์ž…๋ ฅํ•˜์—ฌ Create ๋ฒ„ํŠผ์„ ํด๋ฆญํ•œ๋‹ค.


nCube-Air์˜ RGB-LED๊ฐ€ con์˜ ๊ฐ’์— ๋”ฐ๋ผ์„œ ์ ๋ฉธํ•œ๋‹ค.

์ด๋กœ์„œ nCube-Air๊ฐ€ ์ธก์ •ํ•˜์—ฌ Mobius์— ์—…๋กœ๋“œํ•œ ๊ณต๊ธฐ ์งˆ ๋ฐ์ดํ„ฐ๋ฅผ ์กฐํšŒํ•˜๊ณ , nCube-Air์˜ RGB-LED๋ฅผ ์ œ์–ด๋ฅผ ์™„๋ฃŒํ•˜์˜€๋‹ค.

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** โš ๏ธ