2025/03/26 3

[Raspberry Pi 5] Mosquitto 설치

라즈베리파이에 아두이노 연결하고 mqtt 사용할거라 설치했다. 1. Mosquitto 설치apt install -y mosquitto mosquitto-clients2. Mosquitto 실행$ systemctl enable mosquittoSynchronizing state of mosquitto.service with SysV service script with /lib/systemd/systemd-sysv-install.Executing: /lib/systemd/systemd-sysv-install enable mosquitto$ systemctl start mosquitto$ systemctl status mosquitto● mosquitto.service - Mosquitto MQTT Broke..

[Arduino] Arduino CLI에서 .ino 실행하기

최근에 하게 된 토이 프로젝트가 아두이노에 센서 모듈 붙여서 통신해야하는거라 겉핡기 식으로 배우긴 싫었고 직접 사서 해보자 싶어서 공부 중이다. 아두이노 쪽은 이제 입문 단계라 설명을 잘 하지는 못하겠고 메모용으로 남긴다. .inoArduino 프로젝트(스케치) 기본 코드 파일 확장자C++ 기반으로 작성setup(), loop() 메소드를 필수로 작성해야한다.자동 전처리 기능 Arduino 관련 파일 모아 둘 디렉토리를 만든다. 알아서 만들자. $ pwd/arduino 나는 ‘/’ 경로에 ‘arduino’ 디렉토리를 생성했다. 프로젝트 하나 당 하나의 ino 파일을 가진다고 한다. 프로젝트 단위로 디렉토리를 만들자. $ tree.└── test 테스트 코드를 실행할 ino 파일을 생성한다. void se..

Arduino 2025.03.26

[Arduino] Arduino CLI 설치 및 ESP32 연결하기

설치 환경Raspberry PI5Debian 1. Arduino CLI 설치$ curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh 나는 ‘/opt’ 경로에 설치했으며 설치 후 ‘/opt/bin/’ 내부에 ‘arduino-cli’ 디렉토리가 설치되길래 ‘/opt’에서 바로 접근 가능하게 디렉토리를 옮겼다.2. Arduino CLI PATH 추가[참고] 해당 작업은 Arduino CLI를 설치해놓은 경로에서만 ‘arduino-cli’ 명령어가 적용되길래 설정해놓은 부분이다. $ echo 'export PATH=$PATH:/opt' >> /root/.bashrc$ source /root/.bashrc ‘e..

Arduino 2025.03.26