描述 从档案读取资料。 read() 是从 Stream 继承而来。 语法 file.read() 参数 file:被 SD.open() 回传的 File 物件 回传 byte:回传档案未读资料中最前面的字元,如果没有未读资料可以读回传 -1 See Also - available() - peek() - write() - Stream.read() 函式库参考主页面 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 […]
描述 取得档案的大小。 语法 file.size() 参数 file:被 SD.open() 回传的 File 物件 回传 unsigned long:档案的大小,单位为位元组 函式库参考主页面 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 domain.
描述 移动读取及写入资料到档案的位置。 语法 file.seek(pos) 参数 file:被 SD.open() 回传的 File 物件 pos:要移动到的目标位置,型态为 unsigned long 回传 bool:执行成功则回传 true,反之回传 false See Also - position() 函式库参考主页面 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 […]
描述 写入资料到 MicroSD 卡裡的档案,在资料写入完成后再写入一个换行字元(’\n’)到档案,该档案必须是以写入模式打开。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 123 ,print() 会把 123 当作 ‘1’, ‘2’, ‘3’ 三个字元)。 语法 file.println() file.println(data) file.print(data, BASE) 参数 file:被 SD.open() 回传的 File 物件 data:要传送的资料,型态可以为 char, byte, int, long 或 string BASE(非必要):BASE 用来指定资料的格式;可用的格式有:BIN(二进位格式)、OCT(八进位格式)、DEC(十进位格式)、HEX(十六进位格式) 回传 byte:回传 println() 写入至档案的位元组数量 See Also - print() - write() 函式库参考主页面 The text of the 86Duino reference is a modification of the […]
描述 写入资料到 MicroSD 卡裡的档案,该档案必须是以写入模式打开。当要传送的资料为数字时,每一位数会被拆开来并各自被当作字元(例:如果要送的资料为 123 ,print() 会把 123 当作 ‘1’, ‘2’, ‘3’ 三个字元)。 语法 file.print(data) file.print(data, BASE) 参数 file:被 SD.open() 回传的 File 物件 data:要传送的资料,型态可以为 char, byte, int, long 或 string BASE(非必要):BASE 用来指定资料的格式;可用的格式有:BIN(二进位格式)、OCT(八进位格式)、DEC(十进位格式)、HEX(十六进位格式) 回传 byte:回传 print() 写入至档案的位元组数量 See Also - println() - write() 函式库参考主页面 The text of the 86Duino reference is a modification of the Arduino […]
描述 取得档案现在的位置,该位置标记下一次读取或写入的位置。 语法 file.position() 参数 file:被 SD.open() 回传的 File 物件 回传 unsigned long:目前档案的位置 See Also - seek() 函式库参考主页面 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 domain.
以下以一系列的连续图示,说明把 86Duino 开发板插上 Windows 8 电脑后,安装 86Duino 驱动程式的步骤。 (回到 在 Windows 下使用 86Duino 页面。) Getting-Started Home The text of the 86Duino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License.
描述 回传档案未读资料中的第一个字元,回传后不把该字元认为是已读。由于没有把回传的字元认为是已读,所以如果没有呼叫 read() 每次呼叫 peek() 都会得到同一个字元。 peek() 是从 Stream 继承而来。 语法 file.peek() 参数 file:被 SD.open() 回传的 File 物件 回传 int:回传档案未读资料中最前面的字元,如果没有未读资料可以读回传 -1 See Also - available() - read() - write() - Stream.peek() 函式库参考主页面 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. […]
描述 把对档案的修改实际写入 MicroSD 卡,这个动作在关闭档案时会自动执行。 read() 是从 Stream 继承而来。 语法 file.flush() 参数 file:被 SD.open() 回传的 File 物件 回传 无回传值 See Also - close() - Stream.flush() 函式库参考主页面 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 […]
描述 关闭档案并且确保对档案的修改储存至 MicroSD 卡。 语法 file.close() 参数 file:被 SD.open() 回传的 File 物件 回传 无回传值 See Also - SD: open() 函式库参考主页面 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 domain.