SD.begin():修訂版本之間的差異

從 YFRobotwiki
跳到: 導覽搜尋
 
(由1名用戶作出的一個中途修訂版本未被顯示)
第 9 行: 第 9 行:
 
<font color="orange" size="+1">'''描述'''</font>
 
<font color="orange" size="+1">'''描述'''</font>
  
Initializes the SD library and card. This begins use of the SPI bus (digital pins 11, 12, and 13 on most Arduino boards; 50, 51, and 52 on the Mega) and the chip select pin, which defaults to the hardware SS pin (pin 10 on most Arduino boards, 53 on the Mega). Note that even if you use a different chip select pin, '''the hardware SS pin must be kept as an output''' or the SD library functions will not work.
+
初始化SD库及SD卡。它使用了SPI总线(多数arduino板为数字引脚11、12和13;Mega板上为引脚50、51和52)和片选引脚,一般默认的硬件SS引脚(多数arduino板为引脚10,Mega上为53引脚)。注意,即使你使用其他片选引脚,''' 硬件SS引脚也必须保持为一个输出引脚''' 否则SD库函数将不工作。
  
  
第 15 行: 第 15 行:
  
 
SD.begin()
 
SD.begin()
 +
 
SD.begin(cspin)  
 
SD.begin(cspin)  
  
第 20 行: 第 21 行:
 
<font color="orange" size="+1">'''参数'''</font>
 
<font color="orange" size="+1">'''参数'''</font>
  
cspin (optional): the pin connected to the chip select line of the SD card; defaults to the hardware SS line of the SPI bus
+
cspin (可选):连接到SD卡片选线的arduino引脚号;默认SPI总线下的硬件SS(Slave Select/从机选择)线
  
  
 
<font color="orange" size="+1">'''返回值'''</font>
 
<font color="orange" size="+1">'''返回值'''</font>
  
true on success; false on failure
+
成功返回true,失败返回false
  
 
|}
 
|}

2015年7月28日 (二) 22:23的最新修訂版本

SD

begin()


描述

初始化SD庫及SD卡。它使用了SPI總線(多數arduino板為數字引腳11、12和13;Mega板上為引腳50、51和52)和片選引腳,一般默認的硬件SS引腳(多數arduino板為引腳10,Mega上為53引腳)。注意,即使你使用其他片選引腳,硬件SS引腳也必須保持為一個輸出引腳否則SD庫函數將不工作。


語法

SD.begin()

SD.begin(cspin)


參數

cspin(可選):連接到SD卡片選線的arduino引腳號;默認SPI總線下的硬件SS(Slave Select/從機選擇)線


返回值

成功返回true,失敗返回false


返回SD庫

返回Arduino庫菜單

返回首頁

更多建議和問題歡迎反饋至 YFRobot論壇