Arduino IDE는 몇 번째 줄인지도 안 보이고 자동 완성도 없고 테마도 선택이 안 되고 터미널도 없고 여러모로 불편하다…
그래서 전에 웹 개발할 때 잘 쓰던 VS Code로 개발하고자 했다.
어떤 블로그(setting.json 참고) - https://juahnpop.tistory.com/71
유튜브 영상(전체적인 흐름, 설정 참고) - https://www.youtube.com/watch?v=JmvMvIphMnY
Arduino, VS Code 설치
이때 arduino_debug.exe의 위치를 vscode에서 알아야 하기 때문에 Microsoft Stroe에서 arduino app을 다운받지는 말자.. 나는 예전에 Microsoft Store에서 다운받았어서 arduino_debug.exe가 어디있는지 한참 찾았다. 결국 못 찾고 앱은 지우고 다시 설치함.
VS Code에서 arduino와 c/c++ extention
c/c++ 설치 돼있었는데 하다보니 설치하라고 알림 뜸. 그래서 또 설치함(?)
VS Code Setting(ctrl + , ) → extensions → arduino → Edit in settings.json
"arduino.path": "C:/Program Files (x86)/Arduino",
"arduino.commandPath": "arduino_debug.exe",
"arduino.logLevel": "info",
"arduino.allowPDEFiletype": false,
"arduino.enableUSBDetection": true,
"arduino.disableTestingOpen": false,
"arduino.additionalUrls": [
"https://raw.githubusercontent.com/VSChina/azureiotdevkit_tools/master/package_azureboard_index.json",
"http://arduino.esp8266.com/stable/package_esp8266com_index.json"
],
"arduino.defaultBaudRate": 115200,
"window.zoomLevel": -1
arduino.path랑 arduino.commanPath는 알겠는데 나머지는 모르겠음. arduino_debug.exe는 아두이노 IDE 화면 없이 사용할 수 있는 그런 거라고 함.
arudino 프로젝트 폴더 생성 (폴더 아래 파일 확장명은 .ino)
VS Code 아래 파란줄에서 Board, Board Rate, Port 등 아래처럼 설정
콘셉트 같은 게 Serial Monitor같음. 누르면 아래처럼 돼서 Board Rate 설정 가능
VS Code 오른쪽 위에서 업로드 가능 (아래 화살 표시 = 업로드)
이제 터미널도 편하게 쓰겠다~ git 저장소에 코드를 꾸준히 저장해보자. 컴퓨터를 포맷해서 git도 다시 설치 해야한다.
git 설치 참고 - https://taewow.tistory.com/13
git ignore 작성 참고 - https://inpa.tistory.com/entry/GIT-⚡️-gitignore-자동-생성#.gitignore작성규칙