“MyFile.read()”的版本间的差异

来自Microduino Wikipedia
跳转至: 导航搜索
 
第1行: 第1行:
<pre style="color:green">
+
<p style="color: #666666;font-size:220%">'''myFile.read();'''</p>
myFile.read();
+
<br>
</pre>
 
  
*'''作用''':<br>
+
<p style="color: #E87E05;font-size:135%">'''作用'''</p>
 
读取SD卡中的文件,务必确认已经通过open()函数打开了文件
 
读取SD卡中的文件,务必确认已经通过open()函数打开了文件
  
*'''参数''':<br>
 
  
 +
<p style="color: #E87E05;font-size:135%">'''参数'''</p>
  
  
*'''例子''':读取SD卡中的文件<br>
+
<p style="color: #E87E05;font-size:135%">'''示例'''</p>
<pre style="color:green">
+
读取sd卡中的文件并串口返回
 +
<source lang="cpp">
 
   if (dataFile) {
 
   if (dataFile) {
 
     while (dataFile.available()) {
 
     while (dataFile.available()) {
第18行: 第18行:
 
     dataFile.close();
 
     dataFile.close();
 
   }
 
   }
</pre>
+
</source>
<br>
+
<p style="color: #E87E05;font-size:135%">'''其它'''</p>
<p style="color: #E87E05;font-size:135%">其他</p>
+
 
*[[SD卡相关声明|类声明]]
+
*[[SD卡相关声明|实例化]]
 
* SD :
 
* SD :
  
第31行: 第31行:
 
*[[myFile.close()|close()]]
 
*[[myFile.close()|close()]]
 
*[[myFile.available()|available()]]
 
*[[myFile.available()|available()]]
 
+
[[MCookie-SD Reference | 返回SD模块语法手册]]
 
 
<br>
 
 
 
[[https://wiki.microduino.cn/index.php/GPS_Reference 返回GPS库语法手册]]
 

2018年5月16日 (三) 07:14的最新版本

myFile.read();


作用

读取SD卡中的文件,务必确认已经通过open()函数打开了文件


参数


示例

读取sd卡中的文件并串口返回

  if (dataFile) {
    while (dataFile.available()) {
      Serial.write(dataFile.read());
    }
    dataFile.close();
  }

其它

  • myFile :

返回SD模块语法手册