<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://wiki.ocrobot.com/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://wiki.ocrobot.com/feed.php">
        <title> reference:library</title>
        <description></description>
        <link>https://wiki.ocrobot.com/</link>
        <image rdf:resource="https://wiki.ocrobot.com/lib/tpl/20cones/images/favicon.ico" />
       <dc:date>2026-07-18T16:30:24+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:8f328p_pmu&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:accelstepper&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:available&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:begin&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:client&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:clientavailable&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:clientconnect&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:clientconnected&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:clientflush&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:clientprint&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:clientprintln&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:clientread&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:clientstop&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:clientwrite&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:eeprom&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:eepromread&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:eepromwrite&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethercard&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernet&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernet2&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetbegin&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetclient&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetipaddress&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetlocalip&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetmaintain&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetserver&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpavailable&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpbegin&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpbeginpacket&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpendpacket&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpparsepacket&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpread&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpremoteip&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpremoteport&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpwrite&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:firmata&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystal&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalautoscroll&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalbegin&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalblink&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalclear&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalconstructor&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalcreatechar&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalcursor&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystaldisplay&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalhome&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystallefttoright&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnoautoscroll&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnoblink&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnocursor&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnodisplay&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalprint&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalrighttoleft&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalscrolldisplayleft&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalscrolldisplayright&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalsetcursor&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalwrite&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:main&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:modbus&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:pid&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:print&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:println&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:sd&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:sdi-12&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12begin&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12end&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12forcehold&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12forcelisten&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:server&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:servo&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_attach&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_attached&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_detach&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_read&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_write&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_writemicroseconds&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:sleepdog&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserial&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialavailable&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialbegin&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialconstructor&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialislistening&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareseriallisten&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialoverflow&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialpeek&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialprint&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialprintln&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialread&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialwrite&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:spi&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:spibegin&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:spiend&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:spisetbitorder&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:spisetclockdivider&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:spisetdatamode&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:spitransfer&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:stepper&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:wire&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:wirebegin&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:wirebegintransmission&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:wirerequestfrom&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:write&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeaddress&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbee&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeeavailable&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeebegin&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeebegintransmission&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeecanceltransmission&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeeendtransmission&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeegetlasted&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeegetlastrssi&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeegetlqi&amp;rev=1760151335&amp;do=diff"/>
                <rdf:li rdf:resource="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeewrite&amp;rev=1760151335&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://wiki.ocrobot.com/lib/tpl/20cones/images/favicon.ico">
        <title></title>
        <link>https://wiki.ocrobot.com/</link>
        <url>https://wiki.ocrobot.com/lib/tpl/20cones/images/favicon.ico</url>
    </image>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:8f328p_pmu&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:8f328p_pmu</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:8f328p_pmu&amp;rev=1760151335&amp;do=diff</link>
        <description>PMU</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:accelstepper&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:accelstepper</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:accelstepper&amp;rev=1760151335&amp;do=diff</link>
        <description>AccelStepper类语法手册</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:available&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:available</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:available&amp;rev=1760151335&amp;do=diff</link>
        <description>available()

描述

连接客户端，获取连接到服务器的客户端的数据，连接一直保持直到连接的客户端超出范围。你可以使用client.stop()关闭它。

语法

server.available()

参数

None

返回

客户端对象，如果没有客户端有数据需要读取，这个对象会关闭。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:begin&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:begin</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:begin&amp;rev=1760151335&amp;do=diff</link>
        <description>begin()

描述

服务器开始监听连接。

语法

server.begin()

参数

None

返回

None

例子


#include &lt;SPI.h&gt;
#include &lt;Ethernet.h&gt;

// MAC地址
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };  
// IP地址
byte ip[] = { 10, 0, 0, 177 };    
//网关:
byte gateway[] = { 10, 0, 0, 1 };
// 掩码:
byte subnet[] = { 255, 255, 0, 0 };

// 默认端口是23
EthernetServer server = EthernetServer(23);

void setup()
{
  // 初始化设备
  Ethernet.begin(mac, ip, gateway, subnet);

  // 开始监听客户端
  server.begin();
}

void loop()
{
  //如果客户端连接，读取数据 
  Ethe…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:client&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:client</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:client&amp;rev=1760151335&amp;do=diff</link>
        <description>Client

描述

client是Ethernet的基础的类。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:clientavailable&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:clientavailable</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:clientavailable&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet : 客户端类

available()

描述

返回可供读取的字节数（即由客户端连接的服务器向客户端写入的数据量）。

available()继承自流实用工具类。

语法

client.available()

参数、变量

none/无

返回类型</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:clientconnect&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:clientconnect</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:clientconnect&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet：客户端类

connect()

描述

连接到指定的IP地址和端口。返回值指示成功或失败。还支持使用域名的DNS查找。

语法

client.connect(ip, port)

client.connect(URL, port)

参数、变量

ip：客户端将连接到的IP地址（4个字节的数组）</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:clientconnected&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:clientconnected</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:clientconnected&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet ：客户端类

connected()

描述

检查客户端是否连接。注意：如果连接已关闭，但仍然有未读的数据时，客户端被视为连接上。

语法

client.connected()

参数、变量

none

返回

如果客户端连接返回true，如果不是则返回false。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:clientflush&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:clientflush</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:clientflush&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet ：客户端类

flush()

丢弃任何已经写入到客户端，但尚未读取的字节。

flush()继承Stream实用程序类。

语法

client.flush()

参数、变量

无

返回

无

返回主菜单</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:clientprint&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:clientprint</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:clientprint&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet ：客户端类

print()

description

发送数据到客户端连接的服务器，由一个回车和换行结束。数字是按照连续的ASCII字符形式发送（例如号码123，发送为五个字符'1'，'2'，'3'，回车，换行）

语法</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:clientprintln&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:clientprintln</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:clientprintln&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet ：客户端类

println()

description

发送数据到客户端连接的服务器，由一个回车和换行结束。数字是按照连续的ASCII字符形式发送（例如号码123，发送为五个字符'1'，'2'，'3'，回车，换行）

语法</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:clientread&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:clientread</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:clientread&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet : 客户端类

read()

读取客户端从服务器端接收到的下一字节（byte） (在上一次调用read()后执行).

read() 继承自 Stream 工具类.

语法

client.read()

参数

none

返回

下一个字节（或字符），如无可返回值则返回 -1。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:clientstop&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:clientstop</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:clientstop&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet : 客户端类

stop()

描述

与服务器断开连接。

语法

client.stop()

参数

none

返回

none

返回主菜单</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:clientwrite&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:clientwrite</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:clientwrite&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet : 客户端类

write()

描述

将数据写入与客户端连接的服务器端。

语法

client.write(data)

参数

data: 要写入的字节或字符

返回

byte：写入的字符数。此返回值非必须读取。

返回主菜单</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:eeprom&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:eeprom</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:eeprom&amp;rev=1760151335&amp;do=diff</link>
        <description>EEPROM库

OCROBOT系列控制器平台上的单片机自带EEPROM。EEPROM是一种当芯片没电时，里面的内容依然可以保存下来的一种储存器，也就是俗称的支持掉电存储。该库可让您读取和写入数据到EEPROM。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:eepromread&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:eepromread</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:eepromread&amp;rev=1760151335&amp;do=diff</link>
        <description>EEPROM

EEPROM.read()

描述

读取一个字节的EEPROM。从未被写入的位置读出值为255。

语法

EEPROM.read（地址）

参数

地址：读取开始的地方（由0开始，必须是int型数据）

返回值

存储在该位置的值（以byte型返回）</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:eepromwrite&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:eepromwrite</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:eepromwrite&amp;rev=1760151335&amp;do=diff</link>
        <description>EEPROM

EEPROM.write()

描述

写一个字节到EEPROM中。

语法

EEPROM.write(地址，值);

参数

地址：字节写入的位置（从0开始，必须是int型）
值：要写入的值，从0到255（必须是byte型）

返回值

无

注释</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethercard&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethercard</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethercard&amp;rev=1760151335&amp;do=diff</link>
        <description>EtherCard

EtherCard是一个ENC28J60的驱动库，支持OCROBOT产品系列中的Atmel MEGA328、1284P、128RFA1，LGT 8F328D核心。

该库的原来是&lt;https://github.com/jcw/ethercard&gt;，作者是Guido Socher与Pascal Stang。遵循GPL2协议。

ENC28J60 类 参考手册

公共静态成员函数</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernet&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernet</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernet&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet库

配合Arduino网络扩展板，使用这个库可以让Arduino板连接到互联网。它既可以作为一个接受传入信息的服务器也可以作为客户端传出信息。库最多可支持四个并发连接（传入或传出或组合）。
Arduino板与网络扩展板的使用SPI总线通信。在Arduino UNO上使用数字引脚11，12和13。在Arduino Mega上使用引脚50，51和52。这两个板上，10引脚都是SS信号口。在Mega上硬件SS端口53好引脚讲不能用于W5100网络板控制。但是其必须保持输出状态，否则SPI总线将无法工作。…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernet2&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernet2</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernet2&amp;rev=1760151335&amp;do=diff</link>
        <description>&lt;https://www.pjrc.com/arduino-ethernet-library-2-0-0/&gt;</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetbegin&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetbegin</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetbegin&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet

Ethernet.begin()

描述

初始化以太网库并进行网络设置。

在1.0版本，该库支持DHCP服务器。 使用 Ethernet.begin(mac)和正确的网络设置，以太网模块会自动获得一个IP地址。这将显著的增加这个代码的使用范围。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetclient&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetclient</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetclient&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet：客户端类

EthernetClient()

描述

创建一个可以连接到指定的互联网IP地址和端口的客户端(在client.connect()中定义)

语法

EthernetClient（）

参数

无

例子


#include &lt;Ethernet.h&gt;
#include &lt;SPI.h&gt;

byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 10, 0, 0, 177 };
byte server[] = { 64, 233, 187, 99 }; // Google 的服务器地址
EthernetClient client;

void setup()
{
  Ethernet.begin(mac, ip);
  Serial.begin(9600);
    delay(1000);
  Serial.println(&quot;connecting...&quot;);
  if (client.connect(server, 80)) {
    Serial.println(&quot;conn…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetipaddress&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetipaddress</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetipaddress&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet : IPAddress类

IPAddress()

描述

定义一个IP地址。它可以用来声明本地和远程地址。

语法

IPAddress(地址);

参数

地址：由逗号分隔的4个byte型数的IP地址例如 192.168.1.1

返回值

无

例子


#include &lt;Ethernet.h&gt;
//网络配置。网关和子网掩码是可选的。
byte mac[] ={0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };  //设定以太网硬件的MAC地址：
byte gateway[] = {10，0，0，1};  //网关地址
byte subnet[] = {255，255，0，0};  //子网掩码：
EthernetServer server = EthernetServer(23);

IPAddress ip(192,168,1,1);  // IP地址的设定与你的网络设定有关

void setup()
{
  //初始化以太网设备
  Ethernet.begin(mac, ip, gateway, subnet);
  //开…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetlocalip&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetlocalip</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetlocalip&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet

Ethernet.localIP()

描述

获得以太网扩展板的IP地址。开启 DHCP 时才有意义。

语法

Ethernet.localIP();

参数

无

返回

IP地址

例子


#include &lt;SPI.h&gt;
#include &lt;Ethernet.h&gt;

//在下面输入控制器的MAC地址
//新的以太网扩展板，MAC地址可以在贴纸上找到
byte mac[] = {  
  0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x02 };

//以IP地址和你要连接的服务器端口（默认为80）初始化以太网客户端库


EthernetClient client;

void setup()
//启动Serial库：
  Serial.begin(9600);
//启动以太网连接：
  if (Ethernet.begin(mac) == 0) {
    Serial.println(&quot;Failed to configure Ethernet using DHCP&quot;);
//循环等待，直到连接到MAC地址：
    for(;;)
…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetmaintain&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetmaintain</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetmaintain&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet

Ethernet.maintain()

描述

Allows for the renewal of DHCP leases. When assigned an IP address via DHCP, ethernet devices are given a lease on the address for an amount of time. With Ethernet.maintain(), it is possible to request a renewal from the DHCP server. Depending on the server's configuration, you may receive the same address, a new one, or none at all.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetserver&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetserver</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetserver&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet：EthernetServer

EthernetServer（）

描述

创建一个在指定端口侦听连接的服务器。

语法

Server(port);

参数

port：要侦听的端口（int）

返回

无

例子


#include &lt;SPI.h&gt;
#include &lt;Ethernet.h&gt;

//配置网络。网关和子网掩码是可选的。


// 以太扩展板的MAC地址：
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
//以太扩展板的IP地址
byte ip[] = { 10, 0, 0, 177 };
//路由器的网关地址：
byte gateway[] = { 10, 0, 0, 1 };
//子网掩码：
byte subnet[] = { 255, 255, 0, 0 };

// telnet默认23号端口
EthernetServer server = EthernetServer(23);

void setup()
{
//初始化以太网设备{
  Ethernet.begin(mac, ip,…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpavailable&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetudpavailable</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpavailable&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet ：UDP协议库

available()

描述

获取缓冲区存储的字节数。这是已经所接收的数据。

此函数只能在调用UDP.parsePacket() 后才能成功调用

available()继承Stream实用程序类。。

语法

UDP.available()

参数</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpbegin&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetudpbegin</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpbegin&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet ：UDP协议类

begin()

描述

初始化ethernet UDP 库并进行网络设置。

语法

EthernetUDP.begin(localPort); 

参数

localPortt：所侦听的本地端口（以int型）

返回

无

例子


#include &lt;SPI.h&gt;
#include &lt;Ethernet.h&gt;
#include &lt;EthernetUdp.h&gt;

//下面为你的控制器输入MAC地址和IP地址。
// IP地址将依赖于你的本地网络设定：
byte mac[] = { 
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 1, 177);
unsigned int localPort = 8888; //所侦听的本地端口

//实例化EthernetUDP，使我们可以发送和接收UDP数据包
EthernetUDP Udp;

void setup(){
  //启动以太网和UDP：
  Ethernet.begin(mac,ip);
  Udp.begin(lo…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpbeginpacket&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetudpbeginpacket</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpbeginpacket&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet ：UDP协议类

beginPacket()

描述

启动连接到远程连接的UDP数据写入

语法

UDP.beginPacket(remoteIP, remotePort); 

参数

remoteIP：远程连接的IP地址（4字节）

remotePort：远程连接的端口（以int型）

返回</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpendpacket&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetudpendpacket</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpendpacket&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet ：UDP协议类

endPacket()

描述

向远程连接写入UDP数据完成后调用，说明写入完成。

语法

UDP.endPacket（）;

参数

无

返回

无

例子


#include &lt;SPI.h&gt;
#include &lt;Ethernet.h&gt;
#include &lt;EthernetUdp.h&gt;

//下面为你的控制器输入MAC地址和IP地址。
// IP地址将依赖于你的本地网络设定：
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 1, 177);
unsigned int localPort = 8888; //所侦听的本地端口
//实例化EthernetUDP，使我们可以发送和接收UDP数据包
EthernetUDP Udp;

void setup() {
  Ethernet.begin(mac,ip);
  Udp.begin(localPort);
}

void loop(){
  Udp.beginPacket(Udp.remot…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpparsepacket&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetudpparsepacket</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpparsepacket&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet ：UDP协议类

parsePacket()

描述

检查是否有一个UDP包需要被读取，若有则报告它的大小。 parsePacket() 必须在用UDP.read()读取缓存之前被使用。

语法

UDP.parsePacket（）;

参数

无

返回值

收到的UDP数据包的大小（以int型返回）</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpread&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetudpread</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpread&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet：UDP CLASS

UDP.read()

描述

从指定的缓冲区中读取的UDP数据。如果没有给出参数，它会返回缓冲区中的下一个字符。

此函数只能调用在成功调用 UDP.parsePacket()之后。

语法

UDP.read();

UDP.read(packetBuffer, MaxSize);</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpremoteip&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetudpremoteip</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpremoteip&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet：UDP CLASS

UDP.remoteIP()

描述

获取远程连接的IP地址。

这个函数必须调用在 UDP.parsePacket()之后。

语法

UDP.remoteIP(); 

参数

无

返回

4个字节：远程连接的IP地址

例子


#include &lt;SPI.h&gt;
#include &lt;Ethernet.h&gt;
#include &lt;EthernetUdp.h&gt;

//为你的控制器输入MAC地址和IP地址。
// IP地址将依赖于你的本地网络：
byte mac[] = {  
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 1, 177);

unsigned int localPort = 8888;      //本地监听端口

// EthernetUDP的实例，让我们通过UDP发送和接收数据包
EthernetUDP Udp;

void setup() {
  //启动以太网和UDP：
  Ethernet.begin(mac,ip);
  Udp.beg…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpremoteport&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetudpremoteport</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpremoteport&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet：UDP CLASS

UDP.remotePort()

描述

获取远程UDP连接的端口。
这个函数必须调用在 UDP.parsePacket() 之后。

语法

UDP.remotePort(); 

参数设置

无

返回

int：与远程主机连接的UDP端口

例子


#include &lt;SPI.h&gt;
#include &lt;Ethernet.h&gt;
#include &lt;EthernetUdp.h&gt;

//为你的控制器输入MAC地址和IP地址。
// IP地址将依赖于你的本地网络：
byte mac[] = {  
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 1, 177);

unsigned int localPort = 8888;      //本地监听端口
// EthernetUDP的实例，让我们通过UDP发送和接收数据包
EthernetUDP Udp;

char packetBuffer[UDP_TX_PACKET_MAX_SIZE]; //用以接收包的缓冲区,
…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpwrite&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:ethernetudpwrite</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:ethernetudpwrite&amp;rev=1760151335&amp;do=diff</link>
        <description>Ethernet：UDP CLASS

UDP.write()

描述

向远程连接发送UDP数据。必须调用在beginPacke()和endPacket()函数之间。beginPacket()初始化数据包，当遇到endPacket()函数时，才发送UDP数据。

语法

UDP.write(message); 

参数设置</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:firmata&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:firmata</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:firmata&amp;rev=1760151335&amp;do=diff</link>
        <description>Firmata Library

通过Firmata程序库执行Firmata协议，在主机电脑上可与软件进行沟通。当您正在使用时，这允许您可以编写自定义固件而无需创建你自己的协议和对象的编程环境。

方法


begin()</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystal&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystal</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystal&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal Library

本库用于OCROBOT控制器平台，驱动基于日立HD44780（或兼容方案）芯片组的液晶显示器，在大部分的1602液晶上使用这种芯片。库在4位与8位模式下都可以工作。

函数

	*  LiquidCrystal()
	*  begin()
	*</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalautoscroll&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalautoscroll</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalautoscroll&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

autoscroll()

简介

打开液晶显示屏的自动滚动,将会使得当一个字符输出到LCD时,令先前的文本移动一个位置.如果当前写入方向为由左到右(默认方向),文本向左滚动.反之,文本向右滚动.它的功能可以理解为,当输出单个字符时,会使得字符总是输出在LCD上的同一个位置.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalbegin&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalbegin</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalbegin&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

begin()

描述

指定显示屏的尺寸（宽度和高度）。

语法

lcd.begin(cols, rows)

参数

cols: 显示器可以显示的列数(1602是16列)

rows: 显示器可以显示的行数(1602是2行)</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalblink&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalblink</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalblink&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

blink()

描述

显示闪烁的光标。如果和cursor()一起使用,最终结果将取决于您使用的LCD屏幕.

语法

lcd.blink()

参数设置

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalclear&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalclear</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalclear&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

clear()

描述

清除LCD屏幕上内容,并将光标置于左上角。

语法

lcd.clear()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalconstructor&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalconstructor</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalconstructor&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

LiquidCrystal()

描述

创建一个LiquidCrystal的实例(构造函数).可使用4线或8线方式作为数据线(请注意,还需要指令线).

若采用四线方式,将d0-d3悬空不连接.RW引脚可接地而不用接在控制器某个引脚上.如果这样接,省略在函数中的rw参数.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalcreatechar&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalcreatechar</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalcreatechar&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

createChar()

描述

创建用户自定义的字符.共可创建8个用户自定义字符,编号从0到7.字符外观由一个8字节数组定义,每行占用一个字节.最低的5个有效位决定像素点所在的行.若要在屏幕显示自定义字符,请使用write()函数.(参数为字符的编号0-7)</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalcursor&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalcursor</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalcursor&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

cursor()

描述

显示光标.(光标所在的位置, 就是下一个字符将会被显示的位置)

语法

lcd.cursor()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystaldisplay&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystaldisplay</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystaldisplay&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

display()

描述

调用noDisplay()隐藏LCD上显示内容后,调用本函数恢复显示.

语法

lcd.display()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalhome&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalhome</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalhome&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

home()

描述

将光标定位在屏幕左上角. 就是说,接下来的字符从屏幕左上角开始显示.如果同时要清除屏幕上的内容,请使用clear()函数代替.

语法

lcd.home()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystallefttoright&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystallefttoright</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystallefttoright&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

leftToRight()

描述

默认的方向,将文本从左到右写入屏幕.这意味着,后续字符的显示将是从左向右的,但是这不会影响先前已经显示的字符.

语法

lcd.leftToRight()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnoautoscroll&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalnoautoscroll</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnoautoscroll&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

noAutoscroll()

描述

关闭自动滚动功能。（后输入的字符可能无法显示）

语法

lcd.noAutoscroll()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnoblink&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalnoblink</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnoblink&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

noBlink()

描述

关闭 光标闪烁功能.

语法

lcd.noBlink()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnocursor&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalnocursor</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnocursor&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

noCursor()

描述

隐藏光标。

语法

lcd.noCursor()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnodisplay&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalnodisplay</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalnodisplay&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

noDisplay()

描述

关闭液晶显示,但原先显示的内容不会丢失. 可使用display()恢复显示.

语法

lcd.noDisplay()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalprint&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalprint</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalprint&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

print()

描述

将文本显示在LCD上.

语法

lcd.print(data) 

lcd.print(data, BASE)

参数


data:要显示的数据,可以是char, byte, int, long或者string类型的

BASE (optional): 数制(可选的),BIN,DEC,OCT,HEX分别将数字以二进制,十进制,八进制,十六进制方式显示出来.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalrighttoleft&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalrighttoleft</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalrighttoleft&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

rightToLeft()

描述

设置文本写入LCD的方向为从右向左（默认是从左向右）。这意味着，后续字符将会由右至左写入，但不影响先前的文本的显示。

语法

lcd.rightToLeft()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalscrolldisplayleft&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalscrolldisplayleft</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalscrolldisplayleft&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

scrollDisplayLeft()

描述

使屏幕上内容(光标及文字)向左滚动一个字符。

语法

lcd.scrollDisplayLeft()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalscrolldisplayright&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalscrolldisplayright</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalscrolldisplayright&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

scrollDisplayRight()

描述

使屏幕上内容(光标及文字)向右滚动一个字符。

语法

lcd.scrollDisplayRight()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalsetcursor&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalsetcursor</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalsetcursor&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

setCursor()

简介

将光标定位在特定的位置。

语法

lcd.setCursor(col, row)

参数

col: 你要显示光标的列 (从0开始计数)

row: 你要显示光标的行 (从0开始计数)</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalwrite&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:liquidcrystalwrite</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:liquidcrystalwrite&amp;rev=1760151335&amp;do=diff</link>
        <description>LiquidCrystal

write()

描述

向LCD写一个字符。

语法

lcd.write(data)

参数

data: 你要显示的字符（仅限英文和数字和你自己定义的字符）。

返回值

byte

write() 将返回写入的字节数，虽然读这个数字是可选</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:main&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:main</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:main&amp;rev=1760151335&amp;do=diff</link>
        <description>类库

程序使用类库提供额外的功能，如与硬件协同工作或操控数据等。在程序中使用类库，可以点击菜单中的“程序 &gt; 导入库”进行操作。

标准类库

	*  EEPROM - 对EEPROM进行读和写
	*  Ethernet - 用于通过以太网扩展板连接到互联网</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:modbus&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:modbus</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:modbus&amp;rev=1760151335&amp;do=diff</link>
        <description>Modbus 协议库

这个库是为了让你的控制器之间通过Modbus协议进行通讯。

Modbus是一种用在工业自动化的主从协议，也可以用在别的地方，比如智能家居。

Modbus一般使用 RS-232 或者 RS-485 协议作为物理层（也叫Modbus串口），Modbus 通过以太网或者WiFi (也叫Modbus IP)使用 TCP/IP进行通信。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:pid&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:pid</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:pid&amp;rev=1760151335&amp;do=diff</link>
        <description>PID库

Github地址：&lt;https://github.com/br3ttb/Arduino-PID-Library&gt;

下载

[PID库V1.2.1]

函数

	*  SetMode(Mode)：设置PID控制器的工作模式，包括自动模式和手动模式。
	*  SetOutputLimits(Min, Max)：设置PID控制器的输出限制，确保输出值在指定范围内。
	*  SetTunings(Kp, Ki, Kd)：设置PID控制器的参数，包括比例系数、积分系数和微分系数。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:print&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:print</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:print&amp;rev=1760151335&amp;do=diff</link>
        <description>print()

描述

写入数据到服务器连接的客户端，由一个回车和换行结束。数字是按照连续的ASCII字符形式写入（例如号码123，发送为五个字符'1'，'2'，'3'，回车，换行）

语法

server.print(data)</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:println&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:println</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:println&amp;rev=1760151335&amp;do=diff</link>
        <description>println()

描述

写入数据到客户端连接的服务器，由一个回车和换行结束。数字是按照连续的ASCII字符形式写入的（例如号码123，发送为五个字符'1'，'2'，'3'，回车，换行）

语法

server.println()</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:sd&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:sd</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:sd&amp;rev=1760151335&amp;do=diff</link>
        <description>SD库

SD库允许在例如Arduino Ethernet Shield之类的扩展板上对SD卡进行读和写的操作。该库基于William Greiman编写的sdfatlib。该库支持在标准SD卡和SDHC卡上使用FAT16和FAT32文件系统。使用8.3格式的短文件名。传递到SD库函数的文件名可以包含由正斜杠/分隔的路径，例如</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:sdi-12&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:sdi-12</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:sdi-12&amp;rev=1760151335&amp;do=diff</link>
        <description>SDI-12

	*  begin()
	*  end()
	*  forceHold()
	*  forceListen()
	*  sendCommand()
	*  sendResponse()
	*  available()
	*  peek()
	*  read()
	*  clearBuffer()
	*  flush()
	*  setActive()
	*  isActive()
	*  handleInterrupt()</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12begin&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:sdi12begin</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12begin&amp;rev=1760151335&amp;do=diff</link>
        <description>SDI12.begin()</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12end&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:sdi12end</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12end&amp;rev=1760151335&amp;do=diff</link>
        <description>SDI12.end()</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12forcehold&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:sdi12forcehold</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12forcehold&amp;rev=1760151335&amp;do=diff</link>
        <description>SDI12.forceHold()</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12forcelisten&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:sdi12forcelisten</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:sdi12forcelisten&amp;rev=1760151335&amp;do=diff</link>
        <description>SDI12.forceListen()</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:server&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:server</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:server&amp;rev=1760151335&amp;do=diff</link>
        <description>Server

描述

Server是Ethernet的基础的类 。没有直接声明，但是每次你要使用这个功能的时候就被引用了。

功能</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:servo&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:servo</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:servo&amp;rev=1760151335&amp;do=diff</link>
        <description>舵机库

本库允许OCROBOT平台控制RC（业余）舵机。舵机集成了减速齿轮和一个可以精确控制的主轴。标准舵机允许主轴定位到不同的角度，通常是0到180度的范围。连续旋转舵机允许旋转轴被设置为各种不同的速度。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_attach&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:servo_attach</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:servo_attach&amp;rev=1760151335&amp;do=diff</link>
        <description>attach()

描述

绑定指定管脚为舵机变量。

语法

servo.attach(pin) 

servo.attach(pin, min, max)

参数

 servo: 舵机类型的变量

pin: 驱动舵机的管脚号

min (可选): 脉冲宽度，以微秒为单位，对应于舵机的最小角度（0到角度）（默认为544）</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_attached&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:servo_attached</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:servo_attached&amp;rev=1760151335&amp;do=diff</link>
        <description>attached()

描述

检查舵机变量是否绑定到管脚

语法

servo.attached()

参数

无

返回

如果舵机已经绑定则返回True，否则返回False</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_detach&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:servo_detach</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:servo_detach&amp;rev=1760151335&amp;do=diff</link>
        <description>detach()

描述

解除舵机变量对于管脚的绑定。如果所有舵机变量都是解除绑定的，那么管脚9和10可以用analogWrite()操作PWM输出

语法

servo.detach()

参数

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_read&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:servo_read</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:servo_read&amp;rev=1760151335&amp;do=diff</link>
        <description>read()

描述

读取当前的舵机角度（该值是最近一次调用write()函数的角度）

语法

servo.read()

参数

无

返回

舵机的角度，范围从0到180度</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_write&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:servo_write</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:servo_write&amp;rev=1760151335&amp;do=diff</link>
        <description>write()

描述

写入一个数值到舵机，控制相应的主轴。标准舵机会设置主轴的角度（单位：度），并移动主轴到目标位置。对于一个连续旋转舵机，这将设定舵机的速度（0表示向一个方向全速运转，180表示相反方向全速运转，90左右的值则表示停止）</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:servo_writemicroseconds&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:servo_writemicroseconds</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:servo_writemicroseconds&amp;rev=1760151335&amp;do=diff</link>
        <description>writeMicroseconds()

描述

写入一个微秒单位的数值(uS)到舵机，控制相应的主轴。标准舵机会设置主轴的角度。标准舵机设置1000是完全的逆时针位置，2000是完全的顺时针位置，而1500则在中间(即1.5ms)。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:sleepdog&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:sleepdog</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:sleepdog&amp;rev=1760151335&amp;do=diff</link>
        <description>SLEEPDOG

该库使用看门狗定时器进行系统复位和低功耗休眠。

硬件支持

目前支持以下硬件:

	*  MANGOII或其他基于ATmega328P的控制器，比如Arduino UNO
	*  MEGA2560或其他基于ATmega2560的控制器，比如Arduino Mega2560</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserial&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareserial</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserial&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial Library

串行总线通过一个称为UART的硬件（芯片内置）进行。这个硬件允许单片机接收串行通信，即使芯片在进行其他工作，只要有64个字节的串行缓冲器的储存空间即可。

使用软件的复制功能（因此称为“SoftwareSerial”），现有的SoftwareSerial 库，以允许其他的控制器的数字引脚的串行通信，这可能有多个软件串口速度高达115200bps。一个参数使反转信号要求该协议的设备。…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialavailable&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareserialavailable</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialavailable&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial

available()

说明

获取字节数（字符），可用于读取软串行端口。读取已经到达并存储在串行接收缓冲区的数据。

语法

mySerial.available()

参数

无

返回

可读取的字节数

例子


//官方的SoftwareSerial库，你可以使用它的功能

#include &lt;SoftwareSerial.h&gt;

#define rxPin 2
#define txPin 3

//建立一个新的串行端口
SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);

void setup() {
  //定义TX，RX引脚编号及模式：
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  //设置软串行端口的数据传输速率
  mySerial.begin(9600);
}

void loop() {
  if (mySerial.available()&gt;0){
    mySerial.read();
  }
}…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialbegin&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareserialbegin</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialbegin&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial

begin(speed)

说明

设置串行通信速度（波特率）。支持的波特率有300，1200，2400，4800，9600，14400，19200，28800，31250，38400，57600和115200。

参数

speed: 波特率(长)

返回

无

例子


//官方的SoftwareSerial库，你可以使用它的功能：
#include &lt;SoftwareSerial.h&gt;

#define rxPin 2
#define txPin 3

//建立一个新的串行端口
SoftwareSerial mySerial =  SoftwareSerial(rxPin, txPin);

void setup() {
//定义TX，RX的引脚编号及模式：
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
// 设置软串行端口的数据传输速率
  mySerial.begin(9600);
}

void loop() {
// ...
}…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialconstructor&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareserialconstructor</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialconstructor&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial

SoftwareSerial(rxPin,txPin)

说明

调用SoftwareSerial(rxPin, txPin)来创建一个新的软件串行对象，正如下面的例子，其名称需要您自己创建。
您需要调用 SoftwareSerial.begin()来进行通讯。

参数

rxPin：接受串行数据的引脚</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialislistening&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareserialislistening</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialislistening&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial

isListening()

说明

测试软件串口是否正在听取数值。

语法

mySerial.isListening()

参数

无

返回

布尔类型变量

例子


#include &lt;SoftwareSerial.h&gt;

//软件串口：TX =数字引脚2，RX =数字引脚3
SoftwareSerial portOne(2, 3);

void setup()
{
  //启动硬件串口
  Serial.begin(9600);

  //启动软件串口
  portOne.begin(9600);
}

void loop()
{
  if (portOne.isListening()) {
    Serial.println(&quot;Port One is listening!&quot;); 
  }
}</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareseriallisten&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareseriallisten</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareseriallisten&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial

listen()

描述

能够选择软件串口进行听取数据。每次只有一个软件串口可以听取数据，到达其他串口的数据将被丢弃。在调用 listen() 期间，任何数据将会被丢弃。(除非被给予的实例已经在听取数据)。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialoverflow&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareserialoverflow</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialoverflow&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial

overflow()

说明

测试软件串行已缓冲区是否溢出。调用此函数清除溢出标志，这意味着它将返回false，除非在此期间另字节的数据已收到并丢弃。

软件串行缓冲器可容纳64个字节的数据。

语法</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialpeek&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareserialpeek</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialpeek&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial

peek()

说明

返回软件串口RX引脚上接收到的字符。不像 read()，当然，随后调用这个函数会返回相同的字符。

请注意，在同一时间只有一个串口可以接收输入的数据（与 listen()函数二选一）。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialprint&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareserialprint</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialprint&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial

print(data)

描述

打印由引脚发送到软件串口的数据。和函数serial.print()的功能相同。

参数

多种多样， 详情请参考 Serial.print() 

返回

byte
print()将返回写入数据的字节数，虽然读取那个数组的可选择的</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialprintln&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareserialprintln</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialprintln&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial

println(data)

描述

打印引脚发送到软件串口的数据以及换行符。和函数serial.println()的功能相同。

参数

有多种参数，详情请参考 Serial.println()

返回

byte

println()将返回写入数据的字节数，虽然读取那个数组的可选择的</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialread&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareserialread</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialread&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial

read()

描述

返回软件串口RX引脚上接收到的字符。请注意，在同一时间只有一个串口可以接收输入的数据（与 listen() 函数二选一）。

参数

无

返回

读取到的字符，如果无变量输入时返回-1</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialwrite&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:softwareserialwrite</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:softwareserialwrite&amp;rev=1760151335&amp;do=diff</link>
        <description>SoftwareSerial

write(data)

描述

将引脚的数据作为原始数据传送到软件串口打印出来。和函数Serial.write()的功能相同。

参数

详情请参考serial.write()

返回

byte

write()将返回写入数据的字节数，虽然读取那个数组的可选择的</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:spi&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:spi</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:spi&amp;rev=1760151335&amp;do=diff</link>
        <description>SPI库

这个库可以让你将控制器作为主设备，其他外围设备作为从设备与主设备以串行方式进行通信及交换信息。

同步串行外设接口总线（SPI）的简介

同步串行外设接口总线（SPI）是用于MCU（微控制器）与一个或多个外围设备进行短距离快速通讯的同步串行数据协议。它也可以用于两个微控制器之间的通信。
SPI的连接始终是由一个主设备（通常是一个微控制器）来控制外围设备来进行。通常在所有设备上都有三条线，…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:spibegin&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:spibegin</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:spibegin&amp;rev=1760151335&amp;do=diff</link>
        <description>SPI

begin()

描述

初始化SPI总线，将SCK(Pin13)，MOSI(Pin11)和SS(Pin10)管脚设置为输出模式，将SCK和MOSI设置为低电平，SS为高电平。

语法

SPI.begin()

参数

无

返回

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:spiend&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:spiend</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:spiend&amp;rev=1760151335&amp;do=diff</link>
        <description>SPI

end()

描述

停止SPI总线的使用（保持引脚的模式不改变）。

语法

SPI.end()

参数

无

返回

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:spisetbitorder&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:spisetbitorder</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:spisetbitorder&amp;rev=1760151335&amp;do=diff</link>
        <description>SPI

setBitOrder()

描述

设置串行数据传输时，先传输高位还是低位，有LSBFIRST（最低位在前）和MSBFIRST（最高位在前）两种类型可选。

语法

SPI.setBitOrder（order）

参数

order：LSBFIRST（最低位在前）或MSBFIRST（最高位在前）</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:spisetclockdivider&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:spisetclockdivider</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:spisetclockdivider&amp;rev=1760151335&amp;do=diff</link>
        <description>SPI

setClockDivider()

描述

设置SPI串行通信的时钟。通信时钟是由系统时钟分频而得到，分频值有2，4，8，16，32，64或128。默认设置是SPI_CLOCK_DIV4，设置SPI串行通信时钟系统时钟的四分之一。

语法</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:spisetdatamode&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:spisetdatamode</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:spisetdatamode&amp;rev=1760151335&amp;do=diff</link>
        <description>SPI

setDataMode()

描述

设置SPI的数据模式，即：时钟极性和时钟相位。

时钟极性：表示时钟信号在空闲时是高电平还是低电平；

时钟相位：决定数据是在SCK的上升沿采样还是在SCK的下降沿采样。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:spitransfer&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:spitransfer</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:spitransfer&amp;rev=1760151335&amp;do=diff</link>
        <description>SPI

transfer()

描述

用于在SPI总线上传输一个数据，包括发送与接收。

语法

SPI.transfer（val）

参数

val：向SPI总线发送的数据值

返回

从SPI总线上接收的数据值</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:stepper&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:stepper</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:stepper&amp;rev=1760151335&amp;do=diff</link>
        <description>Stepper Library

这个库能够让你控制的单极或双极步进电机。要使用它，你将需要一个步进电机和相应的硬件来控制它。如需更多的信息，请参阅   Tom Igoe的步进电机笔记 。

电路

函数

例子</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:wire&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:wire</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:wire&amp;rev=1760151335&amp;do=diff</link>
        <description>IIC/TWI总线库

这个库允许你通过IIC/TWI设备进行通信。在大多数的OCROBOT控制器上标有SDA，SCL的管脚就是该总线所使用管脚。

函数

	*  begin()
	*  requestFrom()
	*  beginTransmission()
	*  endTransmission()
	*  write()
	*  available()
	*  read()
	*  onReceive()
	*  onRequest()

注解

同时有7 及8位比特的I2C 地址。 7位地址用于识别设备，而第八位的判断它是被写入或读出。在此总线库中，我们使用7位比特的地址如果在你的数据表或示例代码，使用8位地址，你要丢弃最低位（即向右移动一位），产生一个介于0和127之间的地址。…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:wirebegin&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:wirebegin</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:wirebegin&amp;rev=1760151335&amp;do=diff</link>
        <description>Wire.begin()

说明

对库进行初始化，加入I2C总线作为从机或主机。 这通常只被调用一次。

函数

Wire.begin(address)

参数

address：7位从机地址（可选），如果不详细描述（不进行设定），加入的总线被看做主机。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:wirebegintransmission&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:wirebegintransmission</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:wirebegintransmission&amp;rev=1760151335&amp;do=diff</link>
        <description>Wire.beginTransmission()

说明

根据已给地址，开始向I2C的从机进行传输。随后，调用函数 write() 对传输的字节进行排列，调用函数 endTransmission() 进行传输 。

语法

Wire.beginTransmission(address)

参数</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:wirerequestfrom&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:wirerequestfrom</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:wirerequestfrom&amp;rev=1760151335&amp;do=diff</link>
        <description>Wire.requestFrom()

说明

主机中使用，向从机请求数据。这些字节可以通过以下两个函数进行检索available()和read()

为了和某些I2C设备兼容，requestFrom()接收一个布尔类型参数并改变其行为。

如果为真(true)时，requestFrom()在请求之后发送一个停止的指令，释放I2C总线。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:write&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:write</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:write&amp;rev=1760151335&amp;do=diff</link>
        <description>write()

描述

往所有连上服务器的客户端写入数据。数据以字节发送

语法

server.write(val) 
server.write(buf, len)

参数

val: 以字节发送的值

buf: 以字节发送的数组

len: 发送的长度

返回

byte
write()返回写入的字节数 . 不是必须的.</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeaddress&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:zigbeaddress</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeaddress&amp;rev=1760151335&amp;do=diff</link>
        <description>Zigbee

address()

描述

定义Zigbee设备网络地址。

语法

Zigbee.address(本机地址,目标地址)

参数

本机地址: 0-65535

目标地址: 0-65535

返回值

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbee&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:zigbee</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:zigbee&amp;rev=1760151335&amp;do=diff</link>
        <description>Zigbee

----------

ZigBee是基于IEEE802.15.4标准的低功耗局域网协议。根据国际标准规定，ZigBee技术是一种短距离、低功耗的无线通信技术。这一名称（又称紫蜂协议）来源于蜜蜂的八字舞，由于蜜蜂(bee)是靠飞翔和“嗡嗡”(zig)地抖动翅膀的“舞蹈”来与同伴传递花粉所在方位信息，也就是说蜜蜂依靠这样的方式构成了群体中的通信网络。其特点是近距离、低复杂度、自组织、低功耗、高数据速率。主要适合用于自动控制和远程控制领域，可以嵌入各种设备。…</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeeavailable&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:zigbeeavailable</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeeavailable&amp;rev=1760151335&amp;do=diff</link>
        <description>Zigbee

available()

说明

获取从Zigbee无线网络发送来有效的字节数（字符）。这是已经传输到，并存储在串行接收缓冲区的数据。 available()继承了Stream类。

语法

Zigbee.available()

参数

无

返回

可读取的字节数</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeebegin&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:zigbeebegin</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeebegin&amp;rev=1760151335&amp;do=diff</link>
        <description>Zigbee

begin()

描述

初始化Zigbee，选择通信信道。

语法

Zigbee.begin(信道)

参数

信道：1-16可以选择

返回值

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeebegintransmission&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:zigbeebegintransmission</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeebegintransmission&amp;rev=1760151335&amp;do=diff</link>
        <description>Zigbee

beginTransmission()

描述

初始化传输

语法

Zigbee.beginTransmission()

参数

无

返回值

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeecanceltransmission&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:zigbeecanceltransmission</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeecanceltransmission&amp;rev=1760151335&amp;do=diff</link>
        <description>Zigbee

cancelTransmission()

描述

清空传输缓冲区（注意：在传输过程中不能进行清除）

语法

Zigbee.cancelTransmission()

参数

无

返回值

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeeendtransmission&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:zigbeeendtransmission</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeeendtransmission&amp;rev=1760151335&amp;do=diff</link>
        <description>Zigbee

endTransmission()

描述

结束传输（清空FCS区域）

语法

Zigbee.endTransmission()

参数

无

返回值

无</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeegetlasted&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:zigbeegetlasted</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeegetlasted&amp;rev=1760151335&amp;do=diff</link>
        <description>Zigbee

getLastEd()

描述

ED是（Energy Detection）的全称，中文翻译为能量检测。

getLastEd()返回最后一次传输过程中的ED数据

语法

Zigbee.getLastEd()

参数

无

返回值

返回最后一次传输过程中的ED数据</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeegetlastrssi&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:zigbeegetlastrssi</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeegetlastrssi&amp;rev=1760151335&amp;do=diff</link>
        <description>Zigbee

getLastRssi()

描述

Rssi全称（Received Signal Strength Indication），中文翻译为：接收信号强度指示。是Zigbee无线发送层的可选部分，用来判定链接质量，以及是否增大广播发送强度。

getLastRssi()返回最后一次传输过程中的RSSI数据</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeegetlqi&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:zigbeegetlqi</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeegetlqi&amp;rev=1760151335&amp;do=diff</link>
        <description>Zigbee

getLqi()

描述

LQI (link quality indicator)是链路质量指示，表示接收数据帧的能量与质量。其大小基于信号强度以及检测到的信噪比(SNR)，由MAC(media access control)层计算得到并提供给上一层，一般与正确接收到数据帧的概率有关。IEEE 802.15.4标准定义了链路质量：指示(LQI)计量的就是所收到的数据包的强度和质量。</description>
    </item>
    <item rdf:about="https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeewrite&amp;rev=1760151335&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-10-11T02:55:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>reference:library:zigbeewrite</title>
        <link>https://wiki.ocrobot.com/doku.php?id=reference:library:zigbeewrite&amp;rev=1760151335&amp;do=diff</link>
        <description>Zigbee

write()

描述

通过Zigbee无线网络发送二进制数据。数据可以是一个字节，或者多个字节。

语法

Zigbee.write(val) 

Zigbee.write(str) 

Zigbee.write(buf,len) 

参数

val: 以一个字节的形式发送一个值 

str: 以多个字节的形式发送字符串</description>
    </item>
</rdf:RDF>
