본문 바로가기

공부

(153)
[STM32CubeIDE] 오류 노트 Problem description: The float formatting support is not enabled, check your MCU Settings from "Project Properties > C/C++ Build > Settings > Tool Settings", or add manually "-u _printf_float" in linker flags. warnings 메세지 밑줄 삭제
31. 배열을 서브에서 서브로 전달하기 #include void sub2(char *b) { printf("sub2 -> %s\r\n", b); } void sub1(char *a) { printf("sub1 -> %s\r\n", a); sub2(a); } void main(void) { char test[] = "Test"; sub1(test); }
30. 조건부 컴파일 #include # define DEBUG void main(void) { #ifdef DEBUG printf("Debuging\r\n"); #else printf("else\n"); #endif // DEBUG printf("testing\r\n"); } #include # define DEBUG1 void main(void) { #ifdef DEBUG printf("Debuging\r\n"); #else printf("else\n"); #endif // DEBUG printf("testing\r\n"); }
[STM32F401CCU6] USB CDC 일단.. 보드는 PA11, PA12로 연결되어 있다. IOC 설정 이렇게 USB_DEVICE 설정하고... 이젠 모든 진행을 STM32CubeIDE 으로 진행 할 예정입니다. 1. main.c 에서 코딩은... /* USER CODE BEGIN PV */ uint8_t buffer[64]={NULL}; /* USER CODE END PV */ int _write(int file, char *ptr, int len){ CDC_Transmit_FS(ptr, len); return (len); } /* USER CODE END 0 */ /** * @brief The application entry point. * @retval int */ int main(void) { /* USER CODE BEGIN 1 *..
[FTDI]Python 으로 칩 정보로 포트 찾기 pip install ftd2xx import serial import ftd2xx as ftd ser = serial.Serial() def serial_open(): port_name = 'COM5' openSerial(port_name) ser.close() def openSerial(port, baudrate=9600, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, timeout=None, xonxoff=False, rtscts=False, dsrdtr=False): print(port) ser.port = port ser.baudrate = baudrate ser.bytesize = bytes..
8.[Thread] 함수 Thread 와 중간에 정지 시키기 import ctypes import sys import threading import time from PyQt5 import QtWidgets, QtCore from PyQt5.QtCore import QThread from PyQt5.QtWidgets import * class MyWindow(QMainWindow): def __init__(self): super().__init__() self.setupUi(self) self.Button_state = True self.pb_start.clicked.connect(self.click1_function) # thread setup self.test_thread_id = 0 def click1_function(self): if self.Button_..
오류 해결 module 'cv2.cv2' has no attribute 'xfeatures2d' pip install opencv-python==3.4.2.16 opencv-contrib-python==3.4.2.16
명령어 목록 선 검출 cv2.HoughLines(canny, 0.8, np.pi / 180, 150, srn = 100, stn = 200, min_theta = 0, max_theta = np.pi) 이미지,거리,각도,임곗값,거리약수, 각도 약수,최소각도,최대 각도 거리:픽셀 0.0~1.0 각도:0~180 임곗값 : 누산평면의 값 (각도 X 거리) 출처 : Python OpenCV 강좌 : 제 28강 - 직선 검출 - YUN DAE HEE (076923.github.io) 2.