본문 바로가기

전체 글

(291)
[라즈베리파이] node-red-node-pi-gpio 라즈베리파이 5에서 사용하기 https://blaxsior-repository.tistory.com/283 [라즈베리파이] 라즈베리파이5 node-red 연동https://nodered.org/ Node-REDBuilt on Node.js The light-weight runtime is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network on low-cost hardware such as the Raspberry Piblaxsior-repository.tistory.com 이전 글에서 node-red-node-pi-gpio가 라즈베리파이 5에서..
[spring] @Sql 어노테이션 https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/test/context/jdbc/Sql.html Sql (Spring Framework 6.1.11 API)@Sql is used to annotate a test class or test method to configure SQL scripts() and statements() to be executed against a given database during integration tests. Method-level declarations override class-level declarations by default, but this behavior ..
[라즈베리파이] 라즈베리파이5 node-red 연동 https://nodered.org/ Node-REDBuilt on Node.js The light-weight runtime is built on Node.js, taking full advantage of its event-driven, non-blocking model. This makes it ideal to run at the edge of the network on low-cost hardware such as the Raspberry Pi as well as in the cloud. Withnodered.org node-red는 브라우저 기반으로 쉽게 하드웨어 / API / 온라인 서비스 등을 연결하여 개발할 수 있도록 지원하는 개발 도구로, node.js 기반으로 동작한다. http, we..
[라즈베리파이] 브라우저 화면 깨지는 현상 수정 https://forums.raspberrypi.com/viewtopic.php?t=366449해결책sudo adduser srdp ssl-certsudo nano /etc/X11/xrdp/xorg.conf에디터 상에서 Option "DRMDevice" "/dev/dri/renderD128" 부분을 찾고, 뒷부분을 ""으로 수정라즈베리파이에 xrdp를 설치하면 외부 환경에서 라즈베리파이에 GUI 기반으로 접속할 수 있다. 라즈베리파이 환경에서 브라우저를 이용하여 인터넷에 접근할 수 있는데, 다음과 같이 브라우저 화면이 깨지는 현상이 발생한다.나의 경우 초기에 xrdp 자체가 동작하지 않아 아래와 같은 설정을 추가했어야 했다.https://forums.raspberrypi.com/viewtopic.php?..
MQTT - mosquitto & 통신 실습 https://mosquitto.org/ Eclipse MosquittoEclipse Mosquitto is an open source (EPL/EDL licensed) message broker that implements the MQTT protocol versions 5.0, 3.1.1 and 3.1. Mosquitto is lightweight and is suitable for use on all devicesmosquitto.orgMQTT 프로토콜을 구현하는 오픈소스 기반 메시지 브로커. 이클립스 재단에 의해 관리되고 있다. mosquitto: MQTT 브로커mosquitto_pub: MQTT 메시지를 게시하는 클라이언트mosquitto_sub: MQTT 메시지를 구독하는 클라이언트mosqui..
MQTT(Message Queueing Telemetry Transport) https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html MQTT Version 5.0 docs.oasis-open.orgMQTT는 주로 IoT 통신에 사용되는 OASIS 표준 pub-sub 기반 메시징 프로토콜이다. TCP/IP 위에서 동작하며, 헤더 크기가 작기 때문에 효율적인 통신이 가능하다.배경1999년 위성을 통해 정유 파이프라인을 모니터링하기 위한 목적으로,최소한의 배터리 손실 및 대역폭으로 통신할 수 있는 프로토콜로 개발되었다. 이후 IBM은 2010년 MQTT 3.1을 개방형 프로토콜로 오픈했고, 2013년 유지 관리를 위해 OASIS( Organization for the Advancement of Structured Information S..
[소프티어부트캠프] 파일 업로드 & 공백 제거의 위험성 소프티어 부트캠프에서 파일 업로드 중, 특정 webp 파일이 깨지는 문제가 발생했다. 기존 코드 베이스는 다음과 같다.StringBuilder partBodyStr = new StringBuilder();char[] bodyBuffer = new char[1024];while((br.read(bodyBuffer)) != -1) { partBodyStr.append(bodyBuffer);}byte[] partBody = partBodyStr.toString().trim().getBytes(StandardCharsets.ISO_8859_1);FormDataUtil.addFormData(req, partName, new FormItem(filename, partBody));Stringbuilder..
[라즈베리 파이] cpu 온도 측정 + 웹 환경에서 보기 https://www.nicm.dev/vcgencmd/라즈베리 파이는 vcgencmd라는 라즈베리 파이 전용 cli 프로그램이 있다. 온도 이외에도 코어 개수, 전압 등 다양한 정보를 볼 수 있으며, 이번에는 vcgencmd 툴을 이용해서 라즈베리 파이의 온도를 측정한다.아래 명령을 입력하면 현재 라즈베리 파이의 CPU 온도를 알려준다.vcgencmd measure_temp이때, 파이썬의 os.popen 메서드를 이용하면 stdout을 입력받을 수 있다. popen은 cmd에 대한 파이프를 열어 명령어에 대해 내용을 읽거나 쓸 수 있는 기능으로 보인다. 현재는 실행한 명령의 결과를 읽어오는 용도로 사용한다.print(os.popen("vcgencmd measure_temp").readline())위와 같..