This page is also available in 3 other languages

serialEvent()

설명

Called when data is available. Use Serial.read() to capture this data.

문법

void serialEvent() {
  //statements
}

Arduino Mega only:

void serialEvent1() {
  //statements
}

void serialEvent2() {
  //statements
}

void serialEvent3() {
  //statements
}

매개변수

statements: any valid statements

반환

Nothing

Notes and Warnings

serialEvent() doesn’t work on the Leonardo or Micro.

serialEvent() and serialEvent1() don’t work on the Arduino SAMD Boards

serialEvent(), serialEvent1()``serialEvent2(), and serialEvent3() don’t work on the Arduino Due.

더보기