查看SD库的源代码
←
SD库
跳转至:
导航
、
搜索
因为以下原因,你没有权限编辑本页:
你刚才请求的操作只对属于该用户组的用户开放:
用户
您可以查看并复制此页面的源代码:
{| border="0" cellpadding="10" width="100%" |- |width="50%" valign="top" align="left"| The SD library allows for reading from and writing to SD cards, e.g. on the Arduino Ethernet Shield. It is built on sdfatlib by William Greiman. The library supports FAT16 and FAT32 file systems on standard SD cards and SDHC cards. It uses short 8.3 names for files. The file names passed to the SD library functions can include paths separated by forward-slashes, /, e.g. "directory/filename.txt". Because the working directory is always the root of the SD card, a name refers to the same file whether or not it includes a leading slash (e.g. "/file.txt" is equivalent to "file.txt"). As of version 1.0, the library supports opening multiple files. The communication between the microcontroller and the SD card uses SPI, which takes place on digital pins 11, 12, and 13 (on most Arduino boards) or 50, 51, and 52 (Arduino Mega). Additionally, another pin must be used to select the SD card. This can be the hardware SS pin - pin 10 (on most Arduino boards) or pin 53 (on the Mega) - or another pin specified in the call to SD.begin(). Note that even if you don't use the hardware SS pin, it must be left as an output or the SD library won't work. <font color="darkcyan" size="+1">'''Examples'''</font><br> '''The SD class provides functions for accessing the SD card and manipulating its files and directories.''' :-[[ Datalogger]]: Log data from three analog sensors to a SD card using the SD library :-[[ DumpFile]]: Read a file from a SD card using the SD library and send it over the serial port :-[[ Files]]: Create and destroy a file on a SD card :-[[ ReadWrite]]: Read and write data to and from a file on a SD card :-[[ CardInfo]]: Get information about a SD card |width="30%" valign="top" align="left"| <font color="darkcyan" size="+1">'''SD Class'''</font><br> '''The SD class provides functions for accessing the SD card and manipulating its files and directories.''' :-[[SD begin()| begin()]] :-[[ exists()]] :-[[ mkdir()]] :-[[ open()]] :-[[ remove()]] :-[[ rmdir()]] <font color="darkcyan" size="+1">'''File class'''</font><br> '''The File class allows for reading from and writing to individual files on the SD card.''' :-[[ available()]] :-[[ close()]] :-[[ flush()]] :-[[ peek()]] :-[[ position()]] :-[[ print]] :-[[ println()]] :-[[ seek()]] :-[[ size()]] :-[[ read()]] :-[[ write()]] :-[[ isDirectory]] :-[[ openNextFile()]] :-[[ rewindDirectory()]] |width="20%" valign="top" align="left"| <!-- 空白 --> |} ---- [[Arduino库|返回库菜单]]
返回
SD库
。
导航菜单
个人工具
登录
名字空间
页面
讨论
不转换
变种
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
台灣正體
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
YF-论坛提问
YFRobot-直营店
YFRobot-企业店
Arduino
Arduino之入门篇
Arduino入门教程
Arduino语法参考
Arduino库
Arduino核心代码
编程平台
Mixly库
Mind+库
MakeCode扩展
传感器系列
积木式传感器系列
黑板传感器系列
蓝板传感器系列
Micro:Bit
Micro:Bit 通用基础教程
Valon智能车
Valon-I
帮助
帮助
wiki语法参考
工具箱
链入页面
相关更改
特殊页面
页面信息