SD.begin():修訂版本之間的差異
從 YFRobotwiki
(由1名用戶作出的一個中途修訂版本未被顯示) | |||
第 9 行: | 第 9 行: | ||
<font color="orange" size="+1">'''描述'''</font> | <font color="orange" size="+1">'''描述'''</font> | ||
− | + | 初始化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 | + | cspin (可选):连接到SD卡片选线的arduino引脚号;默认SPI总线下的硬件SS(Slave Select/从机选择)线 |
<font color="orange" size="+1">'''返回值'''</font> | <font color="orange" size="+1">'''返回值'''</font> | ||
− | + | 成功返回true,失败返回false | |
|} | |} |
2015年7月28日 (二) 22:23的最新修訂版本
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 |
更多建議和問題歡迎反饋至 YFRobot論壇