개발자 모드/아두이노(Aduino) (2) 썸네일형 리스트형 Aduino(아두이노) 시리얼 포트 하나 더 이용하기 #include const int rxPin = 2; const int txPin = 3; SoftwareSerial mySerial(rxPin, txPin); void setup() { // put your setup code here, to run once: mySerial.begin(9600); } void loop() { // put your main code here, to run repeatedly: mySerial.println("Hello World!"); delay(1000); } 아두이노 (Aduino) 시리얼 통신 기초 void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: if(Serial.available()) { String inputStr = Serial.readStringUntil('\n'); String OriginStr = "Written Text : "; Serial.println(OriginStr + inputStr); } } 이전 1 다음