Serial.find()

설명

Serial.find()는 대상을 찾을 때까지 직렬 버퍼에서 데이터를 읽습니다. 이 함수는 대상이 발견되면 true를 반환하고 시간이 초과되면 false를 반환합니다.

Serial.find() inherits from the stream utility class.

문법

Serial.find(target)

Serial.find(target, length)

매개변수

  • target: 검색 할 문자열. 허용되는 데이터 유형 : char.
  • length: 타겟의 길이. 허용되는 데이터 유형 : size_t.

반환값

  • bool

※ 주의 및 경고:

Serial functions are not only used for the communication between an Arduino board and Serial Monitor of Arduino IDE but also used for the communication between:

  • An Arduino board and other Arduino board
  • An Arduino board and other sensors/devices
  • An Arduino board and computer (any Serial software on computer)

ARDUINO BUY RECOMMENDATION

Arduino UNO R3
Arduino Starter Kit
Please note: These are affiliate links. If you buy the components through these links, We may get a commission at no extra cost to you. We appreciate it.

※ OUR MESSAGES

  • We are AVAILABLE for HIRE. See how to hire us to build your project
  • Any suggestion, correction, and translation? please email us at ArduinoGetStarted@gmail.com, We appreciate it
  • We mainly keep improving the references in English. See English version of this page for the latest update.