본문 바로가기
라즈베리파이 이어폰 젝 오디오 출력하기 [2022/10/03] First Start. 소나무 기운 , 전자제품 개발/생산 라즈베리파 이어폰 젝 오디오 출력하기 설치된 초기 상태에서는 오디오가 재생되지 않습니다. 오디오 출력이 HDMI로 기본 설정되어 있습니다. 오디오 젝으로 출력하기 위해서는 설정이 필요할 상황입니다. 설정하는 방법과 소프트웨어를 이용하여 오디오를 재생하는 방법에 대해서 알아보겠습니다. 오디오 젝 사용가능하도록 설정하기 설정 진입 방법 sudo raspi-config System Options > Audio > Headphones 를 차례로 선택하여 줍니다. 저장하시고 재부팅합니다. sudo reboot now 오디오 재생 예제 python import os, time from pygame import mixer def pla.. 2022. 9. 26.
Raspberry Pi의 Hardware PWM 사용하기 C,C++,Python [2022/10/02] First Start. 소나무 기운 , 전자제품 개발/생산 Raspberry Pi의 hardware PWM 사용하기 C,C++,Python 라즈베리파이에서는 하드웨어 PWM과 소프트웨어 PWM을 사용할 수 있습니다.여기서는 하드웨어 PWM을 사용하는 방법에 대해서 알아 보도록 할겠습니다. Hardware PWM and software PWM are available on Raspberry Pi.Here we'll learn how to use hardware PWM. 하드웨어 PWM 사용할 수 있도록 설정하기, Enableing Hardware PWM 하드웨어를 사용할 수 있도록 설정하지 않은 상태에서 소프트웨어를 작성해서 사용하고자 하면 에러가 발생합니다. Attempts to .. 2022. 9. 26.
To fix a black border in Raspberry Pi ( Raspberry Pi에서 화면 불일치를 수정하는 방법 ) [2022/09/19] First Start. 소나무 기운 , 전자제품 개발/생산 To fix a black border in Raspberry Pi ( Raspberry Pi에서 화면 불일치를 수정하는 방법 ) Command sudo nano /boot/config.txt Edit config.txt disable_overscan=1 sudo reboot now 마무리 참고문헌 틀린 부분이나 질문은 댓글 달아주세요. 즐거운 하루 보내세요. 감사합니다. 2022. 9. 14.
To change permissions on folders and subfolders/files in Linux at once (하위폴더까지 한번에 권한 변경하기) [2022/09/13] First Start. 소나무 기운 , 전자제품 개발/생산 To change permissions on folders and subfolders/files in Linux at once (하위폴더까지 한번에 권한 변경하기) 권한을 변경하는 chmod 명령에 대해서 알아봅니다. Learn about chmod commands that change permissions. Actions applicable to folders and files. 폴더및 파일에 적용할 수 있는 작업. ㅁ 읽기 r - Readㅁ 쓰기 w - Writeㅁ 변경 x - excute User classification 사용자 구분 ㅁ 파일 소유자 User ㅁ 그룹 Group ㅁ 그외 사용자 Other Help 도.. 2022. 9. 13.
Shutdown and Reboot from inside a C program [2022/09/11] First Start. 소나무 기운 , 전자제품 개발/생산 Shutdown and Reboot from inside a C program @ Raspberry pi vertion pi@raspberrypi:~ $ cat /etc/debian_version 11.2 pi@raspberrypi:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.or.. 2022. 9. 12.
STM32에서 IWDG(WatchDog) 사용하기 [2022/05/12] First Start. 소나무 기운 , 전자제품 개발/생산 STM32에서 IWDG(WatchDog) 사용하기 STM32에는 두 가지의 watch dog이 있어요. IWDG : Independant Watchdog, down counter가 있고 이 counter가 0이 되면 MCU가 reset이 됩니다. 그러니 0이 되기 전에 값을 새로운 값으로 채워 넣어야 합니다. WWDG : Window Watchdog, counter값을 조정할 수 있는 구간이 있어서 좀 더 까다롭게 조건을 줄 수 있어요. 다음에 좀 알아보도록 하죠. 간단한 예제를 만들어 사용법을 알아보도록 할께요. STM32 has two watch dogs. IWDG : Independent Watchdog, down c.. 2022. 5. 12.
Device list of supported MCC ( MPLAB Code Configurator ) [2022/04/21] First Start. MPLAB X IDE v6.00 PIC16F883 XC8 v2.31 MCC v5.1.2 소나무 기운 , 전자제품 개발/생산 Device list of supported MCC ( MPLAB Code Configurator ) 마이크로칩에는 MCC라는 기능이 있어처음부터 하나하나 프로그램을 할 필요가 없다.Microchip has a called MCC, so there is no need to program step by step from the beginning.기본적인 IO설정부터 타이머, UART, bootloader까지 다양한 기능을 포함하여 기본 코드를 생성할 수 있다.Basic code can be generated including variout.. 2022. 4. 21.
strcmp [C][C++][python] [2022/04/05] Insert title image [2022/04/05] Add English subtitles [2022/04/05] Add C++ example [2022/04/04] First Start. 소나무 기운 , 전자제품 개발/생산 strcmp() [C][C++][python] strcmp() 함수를 이용하여 두 개의 문자열을 비교하는 방법을 알아보자. strcmp() 함수는 두개의두 개의 문자열을 서로 비교하여 두 개의 문자열이 같으면 0을 반환한다. 두 개의 문자열이 같지 않으면 0이 아닌 값을 반환한다. Let's find out hot to complare two strings using the strcmp() function. The strcmp() function comp.. 2022. 4. 4.
How to use VNC server in Raspberry Pi [2022/03/29] First Edit 소나무 기운 , 전자제품 개발/생산 How to use VNC server in Raspberry Pi - Raspberry Pi version pi@raspberrypi:~ $ cat /etc/debian_version 11.2 pi@raspberrypi:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPP.. 2022. 3. 29.
CoolTerm, Install Serial HEX terminal in linux. [2022/04/06] Add title image [2022/03/28] First edit 소나무 기운 , 전자제품 개발/생산 CoolTerm, Install Serial HEX terminal in linux. Download http://freeware.the-meiers.org/ Roger Meier's Freeware THE SOFTWARE TITLES ON THIS WEBSITE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONI.. 2022. 3. 29.
Raspberry Pi SD Card backup & recover in the windows. [2022/04/06] Add title image [2022/03/28] The first edit. 소나무 기운 , 전자제품 개발/생산 Raspberry Pi SD Card backup & restore in the windows. 라즈베리파이 SD카드 백업 및 복구하기 Download tool. https://sourceforge.net/projects/win32diskimager/ Win32 Disk Imager Download Win32 Disk Imager for free. A Windows tool for writing images to USB sticks or SD/CF cards . This program is designed to write a raw disk image to a rem.. 2022. 3. 28.
How to Create a Markdown(md) Table [2022/04/06] Add title image [2022/03/17] First Start! 소나무 기운 , 전자제품 개발/생산 How to Create a Markdown(md) Table Basic format | | | | | | |---|---|---|---|---| | | | | | | | | | | | | | | | | | | Align Options 마무리 참고문헌 틀린 부분이나 질문은 댓글 달아주세요. 즐거운 하루 보내세요. 감사합니다. 2022. 3. 17.
sleep() usleep() for linux, Sleep() for windows [2022/04/06] Add title image [2022/03/20] Add usleep() [2022/03/12] Start 소나무 기운 , 전자제품 개발/생산 sleep() usleep() for linux, Sleep() for windows Sleep() for windows #include #include Sleep(1000); // 1000 ms sleep() for linux #include #include #include int main() { char buf[250]; printf("start\n"); time_t begin; time(&begin); sleep(1); time_t end; time(&end); printf("end %0f Sec\n", difftime(end, be.. 2022. 3. 12.
How to Install x11vnc server on Ubuntu 20.04 [2022/04/06] Add title image [2022/03/08] Started. 소나무 기운 , 전자제품 개발/생산 Install x11vnc sudo apt-get update update apt. sudo apt-get install lightdm Install display manager. * Select lightdm sudo reboot Rebooting. sudo apt-get install x11vnc Install x11vnc. sudo nano /lib/systemd/system/x11vnc.service Create a file named x11vnc.service. [Unit] Description=x11vnc service After=display-manager.servi.. 2022. 3. 8.
UDP socket , Broadcast send [2022/04/06] Add title image [2022/03/58] First Edit 소나무 기운 , 전자제품 개발/생산 UDP socket , Broadcast send UDP serv_sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); SOCK_DGRAM, IPPROTO_UDP Broadcast if (setsockopt(serv_sock, SOL_SOCKET, SO_BROADCAST, (const char *)&fBroadcatOpt, sizeof(fBroadcatOpt)) < 0) SO_BROADCAST example uint8_t bySendBuf[44] = {0}; int fBroadcatOpt = 1; // fifo init ThreadINFO_I.. 2022. 3. 8.
linux, ubuntu shutdown command [2022/04/06] Add title image [2022/03/08] started 소나무 기운 , 전자제품 개발/생산 linux, ubuntu shutdown command shutdown [option] [time] [message] sudo shutdown now Turn it off right now. sudo shutdown 11:00 Turn it off at AM 11:00. sudo shutdown -r reboot right now. 마무리 참고문헌 https://linuxize.com/post/linux-shutdown-command/ 틀린 부분이나 질문은 댓글 달아주세요. 즐거운 하루 보내세요. 감사합니다. 2022. 3. 8.
How to use a non-blocking TCP socket. [2022/04/06] Add title image [2022/03/08] Started. 소나무 기운 , 전자제품 개발/생산 How to use a non-blocking TCP socket. int flag = fcntl(client_sock, F_GETFL, 0); fcntl(client_sock, F_SETFL, flag | O_NONBLOCK); Blocking mode example #include #include #include #include #include #include #include #define BUF_SIZE 1024 void other_routine(); int main(int argc, char **argv) { if (argc != 2) { printf("Usage : %s.. 2022. 3. 8.
Microsoft To Do 간단 사용법 [2022/04/06] Add title image Microsoft To Do 간단 사용법 Microsoft To Do 작업 만들기 오늘 할 일, 중요 등 목록에서 선택한후 오른쪽 하단 입력창에 새로운작업명을 입력한 후 Enter를 입력하면 제일 아래에 작업이 추가된다. 작업 편집 작업을 선택하면 오른쪽에 추가 화면이 표시되며 여러가지 내용을 수정할 수 있다. 작업명 클릭하여 작업명 변경이 가능하다. 알람 설정 및 파일 추가까지 가능하다. 작업 삭제 작업 상세화면의 우측하단에 휴지통 아이콘으로 삭제 가능하다. 작업에서 마우스 오른쪽버튼을 눌러 작업삭제를 선택하여 삭제 가능하다. Ctrl 키를 누를 상태로 여러 작업을 선택하여 한번에 삭제가 가능하다. 목록 생성 수정 삭제 화면 좌측 하단에 목록리스트가 .. 2022. 3. 7.
How to Auto Start a Program on Raspberry Pi? [2022/04/06] Add title image [2022/03/07] Start 소나무 기운 , 전자제품 개발/생산 How to Auto Start a Program on Raspberry Pi? (rc.local) 라즈베리파이 부팅시 프로그램 자동실행. Edit rc.local file. sudo nano /etc/rc.local edit rc.local file using nano-editor. 소제목 2 #!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # val.. 2022. 3. 7.
chmod - Replace permissions for file and folders on Linux(Raspberry Pi) [2022/04/06] Add title image [2022/03/07] First Edit 소나무 기운 , 전자제품 개발/생산 Replace permissions for file and folders on Linux(Raspberry Pi) 리눅스(라즈베리파이)에서 파일 및 폴더의 권한 바꾸기 chmod , chmod --help pi@raspberrypi:~ $ chmod --help 사용법: chmod [옵션]... MODE[,MODE]... FILE... 또는: chmod [옵션]... 8진수-MODE FILE... 또는: chmod [옵션]... --reference=RFILE FILE... Change the mode of each FILE to MODE. With --reference, c.. 2022. 3. 7.