Project/[2022 03 ~ 09] IoT Project

    결과

    예선 짤 먹었다.. (임베디드sw 경진대회) 살면서 처음 해보는 프로젝트이고 아두이노같은 mcu나 센서들을 처음 써보는거라 많이 고생했다.. 같이 플젝 했던 형이 많아 도와주셨다... 지금 돌이켜보면 많은 트롤링을 했고 정말 죄송하면서 감사함... 문제란 문제는 다 터뜨리면서 많은 경험을 했다. 그래도 이번 경험으로 프로젝트를 할 때 어떻게 프로세스를 구상해야할지를 알게 되었다.. 코드가 이제보니 세상 더러워서 바로 private ㅋㅋㅋ.. 커밋도 할 때 커밋 내용 잘 작성해서 push하는게 정말 중요한거같다

    [Arudino]WiFi.localIP() to char

    https://forum.arduino.cc/t/converting-message-types-from-one-kind-to-another/574574/3 Converting message types from one kind to another. WiFi.localIP() I guess that returns a String. So, use the c_str() method. forum.arduino.cc 요약: WiFi.localIP()는 리턴 형식이 IPAddress, toString 메소드를 이용하여 String 형식으로 바꿔준 후 c_str을 사용해 char로 바꿔줘야함.. 자세한 내용은 추후 추가

    [Arduino vscode] 헤더파일

    https://forum.arduino.cc/t/include-header-from-another-directory/173859/2 Include header from another directory The problem is that you're acting as if you're in a conventional C++ environment, but you aren't. The Arduino IDE follows its own set of rules to scrape together the set of files that it thinks are necessary to build your sketch, including to doing some ma forum.arduino.cc 자세한 내용은 추후 추..

    [Vscode]Output path is not specified. Unable to reuse previously compiled files. Build will be slower. See README.

    vscode에서 아두이노 개발환경을 세팅하면 업로드 할 때 아두이노IDE에 비해 굉장히 느리게 업로드가 된다. https://arduino.stackexchange.com/questions/45347/warning-when-verifying-sketch-with-vs-code Warning when verifying sketch with VS code I use Visual Studio Code to develop for arduino which uses Arduino Studio installed files and needs the installation to work. This works very well. Annoying is that when verifying a sketch it ta... ar..

    MQTT api document

    https://pubsubclient.knolleary.net/api.html#state Arduino Client for MQTT Library version: 2.8 Constructor Function boolean connect (clientID, [username, password], [willTopic, willQoS, willRetain, willMessage], [cleanSession]) void disconnect () boolean publish (topic, payload, [length], [retained]) boolean publish_P (topic, pa pubsubclient.knolleary.net

    [MQTT] 아두이노 mqtt 서버 연결 실패

    [MQTT] 아두이노 mqtt 서버 연결 실패

    0. 서론 IoT 통신 프로토콜 중 하나인 mqtt를 공부하던 중, 아두이노가 mqtt 서버에 연결을 하지 못하고 계속 실패했다.. 연결 환경 아두이노: WeMos D1 R1(esp 8266) MQTT broker sever: mosquitto API Library: PubSubClient 사진을 보면 와이파이 연결까지는 잘 되지만 arduino와 mqtt 통신이 잘 안 되는 것을 확인할 수 있다. 소스 코드가 복잡해 보이지만 눈여겨볼곳은 line 70에 있는 reconnect 함수이다. 연결을 하지 못하고 client.state()가 -2를 리턴하는 것을 알 수 있다. -2를 리턴은 network connection failed라고 하네요 (Api document 참고) 1. 해결 방법 일주일간 고통받..