nCube:Thyme for Arduino Development Environment Setup with VS Code (PlatformIO IDE) (Korean) - IoTKETI/nCube-Thyme-Arduino GitHub Wiki
์๋์ด๋
ธ ๊ฐ๋ฐ์ ์ํ ๊ฐ๋ฐํ๊ฒฝ์ผ๋ก๋ ๋ณดํต Arduino IDE์ PlatformIO IDE๊ฐ ์ฌ์ฉ๋๋ค.
๋ณธ ๋ฌธ์์์๋ PlatformIO IDE๋ฅผ VC Code (Visual Studio Code)์ ์ค์นํ์ฌ ์ฌ์ฉํ๋ฉฐ,
PlatformIO IDE๋ฅผ ์ฌ์ฉํจ์ผ๋ก์จ ์ทจํ ์ ์๋ ์ฅ์ ๋ค์ ๋ค์๊ณผ ๊ฐ๋ค.
- 400๊ฐ ์ด์์ ๋ณด๋ ๋งค๋์ ์ ๊ณต
- ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋งค๋์
- intelligence code completion๊ณผ smart code linter
VS Code๋ Microsoft ์ฌ์ ์ํด ๊ฐ๋ฐ๋์์ผ๋ฉฐ, ๋ฌด๋ฃ๋ก ์ ๊ณต๋๋ ์ฝ๋ ํธ์ง๊ธฐ์ด๋ค.
VS Code ๋ด์์ ์ ๊ณต๋๋ ๋ง์ผํ๋ ์ด์ค์์ ํ์ฅ ํจํค์ง๋ฅผ ์ค์นํจ์ผ๋ก์จ ๊ธฐ๋ฅ ํ์ฅ์ด ๊ฐ๋ฅํ๋ค.
VS Code official web site์์ OS์ ๋ง๋ VS Code๋ฅผ ๋ค์ด๋ก๋ ๋ฐ๊ณ ์ค์นํ ์ ์๋ค.
VS Code installer๋ฅผ ์คํ์์ผ VS Code๋ฅผ ์ค์นํ๋ค.
์ค์น๊ฐ ๋๋ ๋ค์ VS Code๋ฅผ ์คํํ ๋ชจ์ต์ด๋ค.
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์ ํ ํ๋ฉด์ด ๋ํ๋๋ค.
PlatformIO IDE์ ํ ํ๋ฉด์์ New Project ๋ฒํผ์ ํด๋ฆญํ๋ค.
Name์๋ ์ํ๋ ํ๋ก์ ํธ ์ด๋ฆ์, Board์๋ 'Adafruit Feather M0'๋ฅผ, Framework์๋ 'Arduino'๋ก ์ค์ ํ๋ค.
Location์ Use default location์ ํด์ ํ๊ณ , ์ํ๋ ํ๋ก์ ํธ ํด๋ ์์ฑ ์ฅ์๋ฅผ ์ ํํ ๋ค์ Finish๋ฒํผ์ ๋๋ฅธ๋ค.
ํ๋ก์ ํธ ์์ฑ์ด ์๋ฃ๋ ์ดํ์, VS Code์ Fileํญ์ Open Folder๋ฉ๋ด๋ฅผ ์ ํํ๊ณ ์์์ ์์ฑํ ํ๋ก์ ํธ์ ํด๋๋ฅผ ์ ํํ์ฌ ์ด์ด์ค๋ค.
์์ ๊ทธ๋ฆผ๊ณผ ๊ฐ์ด ํ๋ก์ ํธ ํด๋๊ฐ ์ด๋ฆผ์ ์ ์ ์์ผ๋ฉฐ, ์๋์ด๋
ธ๋ฅผ ๋์์ํค๋ main.cpp ํ์ผ์ด src ํด๋ ์๋์ ์์์ ํ์ธํ ์ ์๋ค.
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๋ฅผ ๊ฐ๋ฐํ๊ธฐ ์ํ ๊ฐ๋ฐ ํ๊ฒฝ๊ตฌ์ฑ์ ์๋ฃ ํ์๋ค.