Raspberry Pi Pico에서 USB Serial을 사용하여 터미널로 문자열을 전송하는 예제입니다. 2021 04. 24 - 최초작성 2022. 9. 9 - 추가 설명 2022. 11. 10 - 패키지 설치 관련 내용 삭제 진행하기 전에 다음 포스트를 먼저 진행해야 합니다. Windows에 Raspberry Pi Pico C 개발 환경 만들기 https://webnautes.tistory.com/2092 1.다음 파일을 다운로드하여 앞에서 진행한 pico 폴더의 다음 위치에 압축을 풀어둡니다. 폴더 이름을 hello_usb이라고 이름을 바꾸었습니다. https://github.com/webnautes/nudapeu/blob/master/project1.zip 2. 다음 위치에 있는 hello_usb..
출처:http://sheepdogguides.com/arduino/aht2printfloat.htm 12345678910111213141516171819202122232425262728293031323334353637383940414243444546/*Program to provide and demonstrate a way to send floating point numbers to the serial stream.*/ double x;double y;double z; void printDouble( double val, unsigned int precision){/* prints val with number of decimal places determine by precision NOTE: precis..
블루투스를 비활성화 시켜야 시리얼 통신을 사용할 수 있기때문에 필요없으시면 이하 내용은 안하셔도 됩니다. 라즈베리파이로 부팅한 후, /boot/config.txt 파일을 편집기로 열은 후, 1$ sudo nano /boot/config.txtcs 마지막 줄에 다음을 추가합니다. 블루투스와 UART를 동시에 사용하면 문제가 발생하므로 블루투스를 사용중지 시켜야 합니다. 1dtoverlay=pi3-disable-btcs 블루투스에서 시리얼을 사용하지 않도록 합니다.1$ sudo systemctl disable hciuartcs PL2303 칩을 사용하는 USB to Serial 컨버터를 라즈베리파이와 연결했습니다. Raspberry PI 3 USB to Serial Converter GND GND RX TX..
아두이노에 LED를 연결해서 시리얼로 특정 문자열을 입력하면 켜고 끄는 것을 구현했습니다. 다른 장치들을 더 붙이고 사용 가능한 명령어들을 더 만들면 다양한 활용이 가능할 듯합니다. 실행결과 turn on을 입력하면 LED를 켜줍니다. led off를 입력하면 LED를 꺼버립니다. 엉뚱한 문자열을 입력하면 입력 가능한 명령들을 알려줍니다. 소스코드 int ledPIN = 10; char ledStatus = LOW; void setup() { // put your setup code here, to run once: Serial.begin(9600); pinMode( ledPIN, OUTPUT ); } String readSerial() { String str = ""; char ch; while( Se..