Articles Posted in the " " Category

  • parseFloat()

    parseFloat()

    描述 parseFloat() 可以回傳串流中第一個可用的浮點數。若檢測到非符點數的字元時 parseFloat() 就會終止。 這個函式是 Stream 類別的一部分,它可以被任何繼承它的類別呼叫 (例如:Wire、Serial 等等) 。 語法 stream.parseFloat() 參數 stream : 一個類別的實例,這個類別是繼承於 Stream 回傳 浮點數 (float 型別) See also - Stream 語法參考主頁面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference […]


  • parseInt()

    parseInt()

    描述 parseInt() 可以回传从串流中读到的第一个整数。假如检测到字元不是数字 parseInt() 就会终止。 这个函式是 Stream 类别的一部分,它可以被任何继承它的类别呼叫 (例如:Wire、Serial 等等) 。 语法 stream.parseInt() 参数 stream : 一个类别的实例,这个类别是继承于 Stream 回传 整数 (int 型别) See also - Stream 语法参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference […]


  • readStringUntil()

    readStringUntil()

    描述 readStringUntil() 可以从串流中读取字元,然后储存成字串后回传。这个函式会在收到结尾字元,或者指定时间内没收到任何值后停止 (时间的设定可参考 setTimeout())。 这个函式是 Stream 类别的一部分,它可以被任何继承它的类别呼叫 (例如:Wire、Serial 等等) 。 语法 stream.readString(terminator) 参数 stream : 一个类别的实例,这个类别是继承于 Stream terminator : 结尾字元 (char 型别) 回传 从串流读到的字串,直到指定的结尾字元。 See also - Stream 语法参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples […]


  • readString()

    readString()

    描述 readString() 可以从串流中读取字元,然后储存成字串后回传。这个函式会在指定时间內没收到任何值后停止 (时间的设定可参考 setTimeout())。 这个函式是 Stream 类别的一部分,它可以被任何继承它的类别呼叫 (例如:Wire、Serial 等等) 。 语法 stream.readString() 参数 stream : 一个类别的实例,这个类别是继承于 Stream 回传 从串流读到的字串 See also - Stream 语法参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released […]


  • readBytesUntil()

    readBytesUntil()

    描述 readBytesUntil()可以把串流收到的字元放到一个指定的阵列中。这个函式会直到侦测到结尾字符、符合指定的长度或超过指定时间后停止 (时间的设定可参考 Serial.setTimeout())。 readBytesUntil() 会回传在缓冲区中的字元总数。假如缓冲取内没有可用的值时,将回传 0。 这个函式是 Stream 类别的一部分,它可以被任何继承它的类别呼叫 (例如:Wire、Serial 等等) 。 语法 stream.readBytesUntil(character, buffer, length) 参数 stream : 一个类别的实例,这个类别是继承于 Stream character : 要寻找的结尾字符 (char 型别) buffer : 储存资料的阵列 (char[] or byte[] 型别) length : 要读取的 byte 总数 (int 型别) 回传 缓冲区内的 byte 总数 See also - Stream 语法参考主页面 The text of the 86Duino […]


  • readBytes()

    readBytes()

    描述 readBytes() 可以从串流读取字元,然后把它们放到指定阵列中,直到符合指定的长度,或是超过一段时间 (时间的设定请参考 setTimeout())。 readBytes() 会回传在缓冲区中的字元总数。假如缓冲取内没有可用的值时,将回传 0。 这个函式是 Stream 类别的一部分,它可以被任何继承它的类别呼叫 (例如:Wire、Serial 等等) 语法 stream.readBytes(buffer, length) 参数 stream : 一个类别的实例,这个类别是继承于 Stream buffer : 储存资料的阵列 (char[] or byte[] 型别) length : 要读取的 byte 总数 (int 型别) 回传 缓冲区内的 byte 总数 See also - Stream 语法参考主页面 The text of the 86Duino reference is a modification of the […]


  • peek()

    peek()

    描述 从串流收到并放在缓冲区内的资料中,取得下次呼叫 read() 会得到的值。呼叫这个函式并不会减少缓冲区内的资料总数,换句话说,透过 peek() 成功取得值后,下次用 read() 也会得到相同的值。 这个函式是 Stream 类别的一部分,它可以被任何继承它的类别呼叫 (例如:Wire、Serial 等等) 。 语法 stream.peek() 参数 stream : 一个类别的实例,这个类别是继承于 Stream 回传 下一个可用的 byte (假如缓冲区内没有值,则回传 -1) int 型别 See also - Stream - available() - read() 语法参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a […]


  • findUntil()

    findUntil()

    描述 findUntil() 可以从外部进来的串流中读取资料,并且找到目标字串,或者找到结尾字串。 若有找到目标字串,则回传 true,一段时间内没找到,则回传 false。 这个函式是 Stream 类别的一部分,它可以被任何继承它的类别呼叫 (例如:Wire、Serial 等等) 。 语法 stream.findUntil(target, terminal) 参数 stream : 一个类别的实例,这个类别是继承于 Stream target : 要找的字串 (char string) terminal : 结尾字串 (char string) 回传 布林值 See also - Stream 语法参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a […]


  • find()

    find()

    描述 find() 可以从串流中读取资料,并且找到给定长度的目标字串。假如有找到目标字串,则回传 true,一段时间内没找到目标字串,则回传 false。 这个函式是 Stream 类别的一部分,它可以被任何继承 Stream 的类别呼叫 (例如:Wire、Serial 等等) 。 语法 stream.find(target) 参数 stream : 一个类别的实例,这个类别是继承于 Stream target : 要找的字串 (char string) 回传 布林值 See also - Stream 语法参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. […]


  • flush()

    flush()

    描述 flush() 可以将串流缓冲区内的值送出,直至里面没有任何值为止。 这个函式是 Stream 类别的一部分,它可以被任何继承它的类别呼叫 (例如:Wire、Serial 等等) 语法 stream.flush() 参数 stream : 一个类别的实例,这个类别是继承于 Stream 回传 布林值 See also - Stream 语法参考主页面 The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public […]