728x90 PlatformIO Serial Monitor 사용법 프로젝트 하단에 위 그림과 같은 버튼을 클릭하면 시리얼 모니터가 열린다. Serial Monitor의 속도를 조절하고 싶으면 platformio.ini에서 monitor_speed를 변경해주면 된다! monitor_speed = 115200 2022. 1. 26. ESP8266 PlatformIO 프로젝트 설정하기 platformio.ini에 아래 코드로 바꿔주면 업로드 성공! [env:myenv] platform = espressif8266 board = nodemcuv2 framework = arduino Reference https://docs.platformio.org/en/latest/platforms/espressif8266.html Espressif 8266 — PlatformIO latest documentation © Copyright 2014-present, PlatformIO. docs.platformio.org 2022. 1. 26. leetcode 1305) All Elements in Two Binary Search Trees LV. Medium 🧐 https://leetcode.com/problems/all-elements-in-two-binary-search-trees/ All Elements in Two Binary Search Trees - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given two binary search trees root1 and root2, return a list containing all the integers from both trees .. 2022. 1. 26. CAN 통신 모듈(MCP2515) MCP2515 내장된 can 통신 모듈을 사용해서 can 통신을 구현할 것이다. MCP2515은 CAN Bus Contoller이다. CAN Bus Contoller에 대해 자세히 알고 싶다면 밑에 링크 클릭! 더보기 https://developer-eun-diary.tistory.com/77 Can Controller, CAN Transceiver CAN 통신에는 Microcontroller, Can Controller, CAN Transceiver가 필요하다. CAN Transceiver 물리적 level을 detection 하는 부분입니다. (High/Low level detection) OSI 7 Layer 중 Physical Layer이다. MC.. developer-eun-diary.tisto.. 2022. 1. 26. leetcode 1510) Stone Game IV LV. Hard 🥵 https://leetcode.com/problems/stone-game-iv/description/ Stone Game IV - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Alice and Bob take turns playing a game, with Alice starting first. Initially, there are n stones in a pile. On each player's turn, that player mak.. 2022. 1. 25. leetcode 941) Valid Mountain Array LV. Easy 😎 https://leetcode.com/problems/valid-mountain-array/ Valid Mountain Array - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 Given an array of integers arr, return true if and only if it is a valid mountain array. Recall that arr is a mountain array if and only if: arr... 2022. 1. 25. Can Controller, CAN Transceiver CAN 통신에는 Microcontroller, Can Controller, CAN Transceiver가 필요하다. CAN Transceiver 물리적 level을 detection 하는 부분입니다. (High/Low level detection) OSI 7 Layer 중 Physical Layer이다. MCP2551가 있다. 받을 때 : CAN transceiver는 CAN bus level에서 CAN controller가 사용하는 levels로 데이터 스트림을 변환한다. CAN controller를 보호하기 위해 보호 전기 회로망을 가지고 있다. 보낼 때 : CAN transceiver는 CAN controller로부터 CAN bus levels로 데이터 스트림을 변환한다. CAN Controll.. 2022. 1. 25. CAN 통신 프레임(Frame) 타입 CAN 통신에는 4가지 프레임 타입을 정의하고 있다. 데이터 프레임(data frame) 각 노드로 전송되는 데이터가 들어 있는 프레임 CAN 2.0A, CAN 2.0B 두 가지의 포맷으로 구성 Aribitration Field의 RTR 값이 0이면 해당 메시지 프레임이 데이터 프레임임을 인지. CAN 2.0A CAN 2.0B 리모트 프레임(remote frame) 다른 노드로부터의 데이터 전송 요구를 알리는 프레임 Aribitration Field의 RTR 값이 1이면 해당 메시지 프레임이 리모트 프레임임을 인지. 에러 프레임(error frame) Bus Error가 검출되었음을 알리는 프레임 Bit Error 전송된 Bit의 상태를 Bus 상에서 관측하여 다른 경우 발생 단 ACK Field, Ar.. 2022. 1. 25. CAN 통신 우선순위 결정 방법 데이터 전송 방법 CAN 통신은 우선순위를 통해 효율적인 통신을 돕는다. 어떻게 우선순위를 결정할까? CAN 통신에는 우성(dominant) 비트와 열성(recessive) 비트가 있다. 우성 비트 : 논리적인 비트 값 0을 가진다. 예를 들어 전기적으로 신호 값을 강제로 low로 내린다. 열성 비트 : 논리적인 비트 값 1을 가진다. 예를 들어 전기적으로 high 상태에 머물러 있는다. 데이터를 전송하는 노드가 2개 이상일 경우 충돌이 발생할 수 있다. 둘이 동시에 보내는 비트 값이 같으면 문제가 되지 않는다. 두 노드가 서로 동시에 0을 보내면 네트워크상에서 0이 지나가며, 둘 다 1이면 1이 지나간다. 그러나 두 노드가 동시에 보내는 비트가 다르다면 네트워크 상에는 우성 비트인 0이 지나가게 된다... 2022. 1. 25. CAN 통신 동작 원리 CAN 통신은 다중 통신망(Multi Master Network)이며 CSMA/CD+AMP(Carrier Sense Multiple Access / Collision Detection with Arbitration on Message Priority) 방식을 이용한다. CAN Node에 메시지를 보내기 전에 CAN 버스라인이 사용 중인지를 파악한다. 또한 메시지 간의 충돌 검출을 수행한다. 이러한 방식은 이더넷 통신 방식과 유사하다. 어떠한 Node로부터 보내어진 데이터 메시지는 송신 측이나 수신 측의 주소를 포함하지 않는다. 대신에 각 노드의 데이터 메시지 항목에 CAN 네트워크 상에서 노드를 식별하기 위한 식별자(ID, 2.0A : 11bits, 2.0B : 29bits)를 가진다. 네트워크 상에 연.. 2022. 1. 25. 이전 1 ··· 6 7 8 9 10 11 12 ··· 17 다음 728x90