Serial.parseInt()

[Serial]

描述

Looks for the next valid integer in the incoming serial stream. parseInt() inherits from the Stream utility class.

If no valid integer is found within one second (adjustable through Serial.setTimeout() ) a default value of 0 will be returned.

語法

適用所有板子:

  • Serial.parseInt()
  • Serial1.parseInt()

適用 86Duino ONE:

  • Serial2.parseInt()
  • Serial3.parseInt()
  • Serial485.parseInt()

適用 86Duino EduCake:

  • Serial2.parseInt()
  • Serial3.parseInt()
  • Serial232.parseInt()

參數

回傳

int : the next valid integer

參考


語法參考主頁面

86Duino 參考的文本是根據 Creative Commons Attribution-ShareAlike 3.0 License,部分文本是從 the Arduino reference 修改的。 參考中的代碼示例已發佈到公共領域。

發表評論

上部へスクロール