개발 블로그
close
프로필 사진

개발 블로그

github: @denev6

  • ALL
    • Troubleshooting
    • Network
      • NetWork
      • Linux
      • Rocky Linux
      • Ubuntu
      • Docker
      • Oracle VM Virtualbox
      • Windows
      • Raspberry Pi 5
      • Jenkins
      • ETC
    • Arduino
      • Linux
      • Windows
    • C++
    • Android
    • Spring
    • STS4
    • SSR
    • Javascript
    • Python
    • React
    [Arduino | Linux] HTML/Javascript에서 릴레이 모듈 전원 제어하기

    [Arduino | Linux] HTML/Javascript에서 릴레이 모듈 전원 제어하기

    1. ino#include #include #include #include #include "include/wifi.h"#include "include/mqtt.h"WiFiUDP ntpUDP;unsigned long lastTime = 0;const long interval = 5000;const char* relayOnTopic = "/relay/on";const char* relayOffTopic = "/relay/off";int relayPin = 26;void setup() { Serial.begin(115200); setupWifi(); setupMq..

    • format_list_bulleted Arduino/Linux
    • · 2025. 4. 7.
    [Arduino | Linux] ESP32 4채널 릴레이 모듈 배선 작업 및 테스트 코드 작성

    [Arduino | Linux] ESP32 4채널 릴레이 모듈 배선 작업 및 테스트 코드 작성

    준비물점퍼 케이블ESP32 보드4채널 릴레이 모듈 릴레이 모듈ESP32설명VCC3.3V전원 공급GNDGND접지 연결IN1GPON26(혹은 D6)릴레이 1 제어 위에 꺼 참고해서 점퍼 케이블로 갖다 꽂으면 된다. 맞물리는 소리나면 연결 된거다. 이제 ino 파일 작성해서 릴레이 모듈 연결이 됐는지 테스트해보자. int relayPin = 26;void setup() { pinMode(relayPin, OUTPUT);}void loop() { digitalWrite(relayPin, LOW); delay(2000); digitalWrite(relayPin, HIGH); delay(2000);} # ino 컴파일$ arduino-cli compile --fqbn esp32:esp3..

    • format_list_bulleted Arduino/Linux
    • · 2025. 4. 5.
    [Arduino | Linux] ESP32 기본 센서 호출 테스트

    [Arduino | Linux] ESP32 기본 센서 호출 테스트

    #include #include #include #include #include "include/wifi.h"#include "include/mqtt.h"#include "include/led.h"WiFiUDP ntpUDP;NTPClient timeClient(ntpUDP, "pool.ntp.org", 32400, 60000);unsigned long lastTime = 0;const long interval = 5000;bool ledState = false;const char* currentTopic = nullptr;const char* mqttTestTopic = ..

    • format_list_bulleted Arduino/Linux
    • · 2025. 4. 1.
    [Arduino | Linux] MQTT로 JSON 데이터 타입 전송하기(+ JSON, NTPClient 라이브러리 다운로드)

    [Arduino | Linux] MQTT로 JSON 데이터 타입 전송하기(+ JSON, NTPClient 라이브러리 다운로드)

    작업 전에 필요한 라이브러리를 다운로드 받는다. 테스트 용으로 여러 데이터를 담아 보내기 위해 JSON 라이브러리, 현재 시간을 받을 수 있는 NTPClient를 다운로드 받았다. $ arduino-cli lib install "ArduinoJson"$ arduino-cli lib install "NTPClient" #include #include #include #include const char* ssid = "WIFI";const char* pwd = "PASSWORD";const char* mqttServer = "MQTT INSTALL SERVER";WiFiClient esbClient;PubSubClient client(esbClient);WiFiUDP nt..

    • format_list_bulleted Arduino/Linux
    • · 2025. 3. 29.
    [Arduino | Linux] HTML/Javascript에서 WebSocket, MQTT를 이용한 Arduino 통신

    [Arduino | Linux] HTML/Javascript에서 WebSocket, MQTT를 이용한 Arduino 통신

    0. 라이브러리 설치$ arduino-cli lib install "WiFi"Downloading WiFi@1.2.7...WiFi@1.2.7 downloadedInstalling WiFi@1.2.7...Installed WiFi@1.2.7$ arduino-cli lib install "PubSubClient"Downloading PubSubClient@2.8.0...PubSubClient@2.8.0 downloadedInstalling PubSubClient@2.8.0...Installed PubSubClient@2.8.01. mqtt_test.ino 작성#include #include const char* ssid = "WIFI";const char* pwd = "PASSWORD..

    • format_list_bulleted Arduino/Linux
    • · 2025. 3. 29.
    [Arduino | Linux] CLI에서 테스트 코드 실행하기

    [Arduino | Linux] CLI에서 테스트 코드 실행하기

    아두이노 쪽은 이제 입문 단계라 설명을 잘 하지는 못하겠고 메모용으로 남긴다. .inoArduino 프로젝트(스케치) 기본 코드 파일 확장자하나의 스케치 파일로 프로그램이 실행되는 시작점C++ 기반으로 작성자동 전처리 기능setup(), loop() 메소드를 필수로 작성해야한다.setup() : 초기화 작업loop() : 계속 실행될 코드 작성여러 개의 보조 ‘.cpp, .h’ 파일을 포함시켜 프로젝트를 확장할 수 있다. Arduino 관련 파일 모아 둘 디렉토리를 만든다. 알아서 만들자. $ pwd/arduino 나는 ‘/’ 경로에 ‘arduino’ 디렉토리를 생성했다. 프로젝트 하나 당 하나의 ino 파일을 가진다고 한다. 프로젝트 단위로 디렉토리를 만들자. $ tree.└── test 테스트 코드를..

    • format_list_bulleted Arduino/Linux
    • · 2025. 3. 29.
    • navigate_before
    • 1
    • 2
    • navigate_next
    공지사항
    전체 카테고리
    • ALL
      • Troubleshooting
      • Network
        • NetWork
        • Linux
        • Rocky Linux
        • Ubuntu
        • Docker
        • Oracle VM Virtualbox
        • Windows
        • Raspberry Pi 5
        • Jenkins
        • ETC
      • Arduino
        • Linux
        • Windows
      • C++
      • Android
      • Spring
      • STS4
      • SSR
      • Javascript
      • Python
      • React
    인기 글
    전체 방문자
    오늘
    어제
    Copyright © 이주여이 모든 권리 보유.
    SKIN: Copyright © 쭈미로운 생활 All rights reserved. Designed by JJuum.
    and Current skin "dev-roo" is modified by Jin.

    티스토리툴바