“Ethernet库”的版本间的差异

来自YFRobotwiki
跳转至: 导航搜索
(以“ {| border="0" cellpadding="10" width="100%" |- |width="30%" valign="top" align="left"| The SD library allows for reading from and writing to SD cards, e.g. on the...”为内容创建页面)
 
第4行: 第4行:
 
|-
 
|-
 
|width="30%" valign="top" align="left"|
 
|width="30%" valign="top" align="left"|
 +
With the Arduino Ethernet Shield, this library allows an Arduino board to connect to the internet. It can serve as either a server accepting incoming connections or a client making outgoing ones. The library supports up to four concurrent connection (incoming or outgoing or a combination).
  
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
+
Arduino communicates with the shield using the SPI bus. This is on digital pins 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used as SS. On the Mega, the hardware SS pin, 53, is not used to select the W5100, but it must be kept as an output or the SPI interface won't work.
  
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
+
<font color="orange" size="+2">'''Examples'''</font><br>
  
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.
+
UDPSendReceiveString: Send and receive text strings via UDP.
The communication between the microcontroller and the SD card uses SPI, which takes place on digital pins 11, 12, and 13 (on most
+
UdpNtpClient: Query a Network Time Protocol (NTP) server using UDP.
 +
DnsWebClient: DNS and DHCP-based Web client.
 +
DhcpChatServer: A simple DHCP Chat Server
 +
DhcpAddressPrinter: Get an IP address via DHCP and print it out
 +
TelnetClient: A simple Telnet client
  
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
+
:-[[ ChatServer]]: set up a simple chat server.
  
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
+
:-[[ WebClient]]: make a HTTP request.
  
you don't use the hardware SS pin, it must be left as an output or the SD library won't work.
+
:-[[ WebClientRepeating]]: Make repeated HTTP requests.
  
 +
:-[[ WebServer]]: host a simple HTML page that displays analog sensor values.
  
<font color="orange" size="+2">'''Examples'''</font><br>
+
:-[[ BarometricPressureWebServer]]: outputs the values from a barometric pressure sensor as a web page.
  
'''The SD class provides functions for accessing the SD card and manipulating its files and directories.'''
+
:-[[ UDPSendReceiveString]]: Send and receive text strings via UDP.
  
:-[[ Datalogger]]: Log data from three analog sensors to a SD card using the SD library
+
:-[[ UdpNtpClient]]: Query a Network Time Protocol (NTP) server using UDP.
  
:-[[ DumpFile]]: Read a file from a SD card using the SD library and send it over the serial port
+
:-[[ DnsWebClient]]: DNS and DHCP-based Web client.
  
:-[[ Files]]: Create and destroy a file on a SD card
+
:-[[ DhcpChatServer]]: A simple DHCP Chat Server
  
:-[[ ReadWrite]]: Read and write data to and from a file on a SD card
+
:-[[ DhcpAddressPrinter]]: Get an IP address via DHCP and print it out
  
:-[[ CardInfo]]: Get information about a SD card
+
:-[[ TelnetClient]]: A simple Telnet client
  
 
|width="10%" valign="top" align="left"|
 
|width="10%" valign="top" align="left"|
第53行: 第57行:
 
:-[[SD:mkdir()| mkdir()]]
 
:-[[SD:mkdir()| mkdir()]]
  
:-[[SD:open()| open()]]
+
<br><br>
 +
<font color="orange" size="+2">'''File class'''</font><br>
  
:-[[SD:remove()| remove()]]
+
'''The File class allows for reading from and writing to individual files on the SD card.'''
 +
 
 +
:-[[SD:available()| available()]]
  
:-[[SD:rmdir()| rmdir()]]
+
 
 +
<br><br>
 +
<font color="orange" size="+2">'''File class'''</font><br>
 +
 
 +
'''The File class allows for reading from and writing to individual files on the SD card.'''
 +
 
 +
:-[[SD:available()| available()]]
 +
 
 +
:-[[SD:close()| close()]]
 +
 
 +
:-[[SD:flush()| flush()]]
 +
 
 +
:-[[SD:peek()| peek()]]
 +
 
 +
:-[[SD:position()| position()]]
 +
 
 +
:-[[SD:print()| print]]
 +
 
 +
:-[[SD:println()| println()]]
  
 
<br><br>
 
<br><br>
第88行: 第113行:
 
:-[[SD:isDirectory()| isDirectory()]]
 
:-[[SD:isDirectory()| isDirectory()]]
  
:-[[SD:openNextFile()| openNextFile()]]
 
  
:-[[SD:rewindDirectory()| rewindDirectory()]]
+
<br>
 +
<font color="orange" size="+2">'''SD Class'''</font><br>
 +
 
 +
'''The SD class provides functions for accessing the SD card and manipulating its files and directories.'''
 +
 
 +
:-[[SD:begin()| begin()]]
 +
 
 +
:-[[SD:exists()| exists()]]
 +
 
 +
:-[[SD:mkdir()| mkdir()]]
 +
 
 +
:-[[SD:open()| open()]]
 +
 
 +
:-[[SD:remove()| remove()]]
 +
 
 +
:-[[SD:rmdir()| rmdir()]]
 +
 
 +
:-[[SD:mkdir()| mkdir()]]
 +
 
 +
:-[[SD:open()| open()]]
 +
 
 +
:-[[SD:remove()| remove()]]
 +
 
 +
:-[[SD:rmdir()| rmdir()]]
  
 
|width="10%" valign="top" align="left"|
 
|width="10%" valign="top" align="left"|

2015年7月21日 (二) 09:32的版本


With the Arduino Ethernet Shield, this library allows an Arduino board to connect to the internet. It can serve as either a server accepting incoming connections or a client making outgoing ones. The library supports up to four concurrent connection (incoming or outgoing or a combination).

Arduino communicates with the shield using the SPI bus. This is on digital pins 11, 12, and 13 on the Uno and pins 50, 51, and 52 on the Mega. On both boards, pin 10 is used as SS. On the Mega, the hardware SS pin, 53, is not used to select the W5100, but it must be kept as an output or the SPI interface won't work.


Examples


UDPSendReceiveString: Send and receive text strings via UDP. UdpNtpClient: Query a Network Time Protocol (NTP) server using UDP. DnsWebClient: DNS and DHCP-based Web client. DhcpChatServer: A simple DHCP Chat Server DhcpAddressPrinter: Get an IP address via DHCP and print it out TelnetClient: A simple Telnet client

- ChatServer: set up a simple chat server.
- WebClient: make a HTTP request.
- WebClientRepeating: Make repeated HTTP requests.
- WebServer: host a simple HTML page that displays analog sensor values.
- BarometricPressureWebServer: outputs the values from a barometric pressure sensor as a web page.
- UDPSendReceiveString: Send and receive text strings via UDP.
- UdpNtpClient: Query a Network Time Protocol (NTP) server using UDP.
- DnsWebClient: DNS and DHCP-based Web client.
- DhcpChatServer: A simple DHCP Chat Server
- DhcpAddressPrinter: Get an IP address via DHCP and print it out
- TelnetClient: A simple Telnet client




SD Class

The SD class provides functions for accessing the SD card and manipulating its files and directories.

- begin()
- exists()
- mkdir()



File class

The File class allows for reading from and writing to individual files on the SD card.

- available()




File class

The File class allows for reading from and writing to individual files on the SD card.

- available()
- close()
- flush()
- peek()
- position()
- print
- println()



File class

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()



SD Class

The SD class provides functions for accessing the SD card and manipulating its files and directories.

- begin()
- exists()
- mkdir()
- open()
- remove()
- rmdir()
- mkdir()
- open()
- remove()
- rmdir()




返回Arduino库菜单

返回首页

更多建议和问题欢迎反馈至 YFRobot论坛